Showing posts with label Debugging. Show all posts
Showing posts with label Debugging. Show all posts

Sunday, March 4, 2012

Extending the debug session in SharePoint 2010


Error Message
The Web server process that was being debugged has been terminated by Internet Information Services (IIS). This can be avoided by configuring Application Pool ping settings in IIS. See help for further details.


Resolution
By default, the IIS application pool waits 90 seconds for an application to respond before it closes the application. This process is known as "pinging" the application. To resolve this issue, you can either increase the wait time or disable application pinging entirely.


To access the IIS app pool settings

  1. Open IIS Manager.
  2. In the Connections pane, expand the SharePoint server node and click Application Pools.
  3. On the Application Pools page, select the SharePoint application pool (typically "SharePoint - 80") and then, in the Actions pane, click Advanced Settings.
  4. To increase the wait time before IIS timeout, change the value of Ping Maximum Response Time (seconds) to a value larger than 90 seconds.
  5. To disable IIS pinging, set Ping Enabled to False.



for more information on the troubleshooting in SharePoint 2010 
http://msdn.microsoft.com/en-us/library/ee231594.aspx

Saturday, January 14, 2012

Not able to debug SharePoint solution



There are cases when you would want to debug your SharePoint solution, but in vain, that debug pointer never gets caught. Reason, your symbols are not matching the binaries it was built with. The following are some of the common tasks we try during these times.

  • Delete the entire bin & obj folders.
  • Ensure that you are on Debug mode.
  • Do a Clean & Rebuild of the solution.
  • Put an System.Diagnostics.Debug.Assert(false); statement. During runtime, the process will throw an exception and then attach the w3wp process. Sometimes it is confusing which w3wp process to attach because there will always be more than one.
Inspite of the above, I have seen it doesn’t attach to the debugger some times.

What has worked consistently, until now is you can force the symbols (pdbs) to be loaded from the bin directory.
Tools > Options > Debugging > Symbols > Click on the Folder icon and specify the path to your bin/pdb directory.
If your build machine and the server machines are different then you can use this to cache the symbol files in the server or debugging machine.


The above steps would hold good for any .net projects. Hope this setting helps you in debugging next time.