2

I built a custom timer job and created a configuration page (.aspx) for it.

Going through the Central Administration site, I can get the to configuration page. When I enter values and click "OK" to save the values, I get a "Object reference not set to an instance of an object." error.

I've tried attaching VS2010 to all the W3WP processes that I have listed (for all users) with no luck.

Am I missing something? Isn't the W3WP process running the Central Admin site?

4
  • What happens when you attach? Are you not getting expected results? Commented Oct 4, 2011 at 17:01
  • Nothing happens when I attach. Nothing at all. I put breakpoints in my code-behind page and they never get hit. Commented Oct 4, 2011 at 17:05
  • 1
    I see! AFAIK, this is the process that should work. Something that I have had to do is redeploy or do an IIS reset which I know is not ideal, but it has worked for me in the past. Commented Oct 4, 2011 at 17:30
  • Okay, I'm a bad, bad code money. Seems that I was attaching to the W3WP process as "Script" debugging, not "Managed". When I attached to the process as "Managed", I was able to debug my code. Thanks for the help. Commented Oct 5, 2011 at 17:23

2 Answers 2

1

Couple of extra suggestions:

  1. I assume you are debugging locally on the machine that is running central admin. If there are multiple servers in the farm, just make sure you are on the server that is actually running central admin.
  2. Try killing the vssphost4 process, and then restart visual studio. I have found that the method VS (which is 32 bit) uses to debug SP2010 (which is 64 bit) gets a little sideways sometimes, and just needs to be restarted.
0
  • The binaries are in GAC, so the symbols files(pdb) should be copied into GAC folder

OR

  • Copy the dll into bin with CAS or Fulltrust (not recommended only in worst case DEV)

Hope this blog post helps http://www.sharepointnutsandbolts.com/2007/03/how-to-debug-sharepoint-feature.html

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.