0

I have developed an SP Feature in C# and tested in development environment, confirming it is functioning correctly.

When I publish to production and enable on a site, I just get a single line in the ULS log when it triggers:

Loading and running the event receiver class TCBSEmailHandler.TCBSMetadataExtractionEventHandler.TCBSMetadataExtractionEventHandler from assembly TCBSEmailHandler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=49f071f6ad2c11c6 failed. Object reference not set to an instance of an object.

What can I do in the production environment to debug this error?

A similar question of mine regarding debugging in development was answered here, but I'm not sure if/how I could apply similar logic to a deployed solution.

2 Answers 2

2

You really shouldn't be debugging in production. Instead, add additional logging capabilities to your app and do more defensive coding. By defensive coding, I mean that if your code is calling some method to get an object, check to see if you got the object before doing anything with it.

1
  • Fair enough. I was already trying logging and that was failing so I was looking for another way around it. I've asked a new question to target the logging issue I'm having here.
    – bdx
    Jul 3, 2015 at 3:18
0

If you are using visual studio ultimate to develop your feature IntelliTrace would be an option. IntelliTrace team done a great job to plugin SharePoint events with IntelliTrace .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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