Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
    
What happens when you attach? Are you not getting expected results? –  spevilgenius Oct 4 '11 at 17:01
    
Nothing happens when I attach. Nothing at all. I put breakpoints in my code-behind page and they never get hit. –  Paige Watson Oct 4 '11 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. –  spevilgenius Oct 4 '11 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. –  Paige Watson Oct 5 '11 at 17:23
add comment

2 Answers

up vote 1 down vote accepted

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.
share|improve this answer
add comment
  • 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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.