Hi All,

Dont get panic after seeing this huge error message in your SharePoint 2010 page.

Usually when you restore a Database to the database related to sharepoint application.

In my case when I restore a database to the old db of SharePoint site it occureed. To see the exact error we need to do little changes in the web.config of ” Security Token Service Application”.

Location of Security Token Service Application.

1) Open IIS.

2) Click Sites Folder

3) Click SharePoint Web Services (Small Globe Icon)

4) There at bottom you can see Security Token Service Application.

5) Right click and click Explore. There Open its web.config file and do the changes.

<!– Behavior List: –>
<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” />

<serviceDebug httpHelpPageEnabled=”true” includeExceptionDetailInFaults=”true” />

<!– Default WCF throttling limits are too low –>

<serviceThrottling maxConcurrentCalls=”65536″ maxConcurrentSessions=”65536″ maxConcurrentInstances=”65536″ />