Showing posts with label Trouble shooting. Show all posts
Showing posts with label Trouble shooting. Show all posts

Tuesday 8 July 2014

The attempt to connect to the report server failed

 

Many times, I saw this error in asp.net log files, when I used asp.net reportviewer for render SSRS reports on asp.net page.

The attempt to connect to the report server failed.  Check your connection information and that the report server is a compatible version.
Debug Info: RepReportViewer::Page_Load-Page could not be loaded: Error occured
StackTrace:    at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod)
   at Microsoft.Reporting.WebForms.ServerReport.EnsureExecutionSession()
   at Microsoft.Reporting.WebForms.ServerReport.GetParameters()
   at repreportviewer.Page_Load(Object sender, EventArgs e) in C:\www\clinics\View.aspx.vb:line 108
InnerException:Client found response content type of '', but expected 'text/xml'.
The request failed with an empty response.

In order to solve the problem, I opened the rssrvpolicy.config reporting services configuration file in the ReportServer virtual directory of the IIS where the report server exists. That is the C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer folder with a default installation.

I updated the following CodeGroup block permission set from Nothing

<CodeGroup
                            class="FirstMatchCodeGroup"
                            version="1"
                            PermissionSetName="Nothing">

to FullTrust in order to let the application access the assemblies successfully.

<CodeGroup
                            class="FirstMatchCodeGroup"
                            version="1"
                            PermissionSetName="FullTrust">

For more information follow these threads.

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/07a1db31-1fad-4555-ad66-7195c44328b6/client-found-response-content-type-of-but-expected-textxml

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/f9d04ca5-6605-4a33-af75-3f72428889d1/rsrender-the-request-failed-with-an-empty-response

Azure AzCopy Command in Action

Azure AzCopy Command  in Action -  Install - Module - Name Az - Scope CurrentUser - Repository PSGallery - Force # This simple PowerShell ...