Saturday, May 10, 2014

Disable SharePoint Service application's Custom Errors and Enable service debug.

You may encountered with following error in SharePoint applications. You need to enable service debug to see real exception in the application.

Sorry, something went wrong
The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework SDK documentation and inspect the server trace logs.

 image

If you are in a multi farm environment first you need to find out where your service applications are running. For an example assume that you need to know where reporting service is running.

Go to central administration and then go to Services on this server.  Here you can change the Farm machine and can see whether reporting server instance is running. so note down machines which has reporting sever instance is running.

image

Then logged in to those machines and find reporting service web service application in IIS. 

image

For that you can change the View to Content View and select each SharePoint Web service and see whether ReportingWebService.svc is available. If yes it the web application corresponding to reporting service service application.

Then open the web.config and add includeExceptionDetailInFaults=”true” to enable service debug.

<serviceBehaviors>     
<behavior>
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
<behavior name="RSExecutionBehavior">
<serviceThrottling maxConcurrentCalls="512" maxConcurrentInstances="512" />
</behavior>
</serviceBehaviors>

Note: if service is running on multiple machines you need to change all related web.config.
Post a Comment