I Eat, Drink SharePoint. Everything about SharePoint 2010. From what is sharepoint to custom development.
Tuesday, March 1, 2011
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 3.0 SDK documentation and inspect the server trace logs.
After you have configured the Claims-based authentication in SharePoint 2010 when you tried to login to the SharePoint site using Forms Authentication, you may see the below message. Remember this is not the error message instead it is telling some helpful information to user on how to know the actual exception.
"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 3.0 SDK documentation and inspect the server trace logs."
This is just like "CustomErrors" mode option in our web.config files. If you set "CustomErrors" mode to "Off" then you can see all exceptions or errors on the SharePoint web page. The same way in your configuration file of WCF application add the <serviceDebug> tag as shown below.
<serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
In my case, I am using SharePoint 2010 and configured my web site to use Claims-based authentication. So, I have made the changes to the Security Token service Web.Config file to add claims-based configuration. So, in web.config file under service behaviour we should add <serviceDebug> tag for seeing actual error message.
<behaviors>
<serviceBehaviors>
<behavior name="SecurityTokenServiceBehavior" >
<!-- The serviceMetadata behavior allows one to enable metadata (endpoints, bindings, services) publishing.
This configuration enables publishing of such data over HTTP GET.
This does not include metadata about the STS itself such as Claim Types, Keys and other elements to establish a trust.
-->
<serviceMetadata httpGetEnabled="true" />
<!-- Default WCF throttling limits are too low -->
<serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
<serviceThrottling maxConcurrentCalls="65536" maxConcurrentSessions="65536" maxConcurrentInstances="65536" />
</behavior>
</serviceBehaviors>
</behaviors>
After I set this in my configuration file, there I am able to see the actual exception details on web page. Hope this helps you as well to find the errors which are coming because of WCF service.
I'm getting that error, except it's in SharePoint Designer 2010. How do you make these changes in SharePoint designer application?
ReplyDeleteSorry, this is not at all related to SPD. This is related to WCF application. Please let me know what is the exact issue.
ReplyDeleteExcellent !!
ReplyDeleteYou saved my day. Thanks !