reportviewer support net trust level: High in remote mode
I have one aspx page and one reportviewer was added. It is working fine with .net Trust Levels "Full". When in production server, .net Trust Levels was set High, it got this errors: Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers. Source Error: Line 17: <body> Line 18: <form id="OSWReportDisplay" runat="server"> Line 19: <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Line 20: Font-Size="8pt" Height="623px" ProcessingMode="Remote" Width="1355px" Line 21: AsyncRendering="False" ShowCredentialPrompts="true"> Source File: e:\temp\omnixx_sqlrpt\OSWReportDisplay.aspx Line: 19 Stack Trace: [SecurityException: That assembly does not allow partially trusted callers.] ASP.oswreportdisplay_aspx.__BuildControlReportViewer1() in e:\temp\omnixx_sqlrpt\OSWReportDisplay.aspx:19 1. how to configure to solve this problem. 2. ReportViewer will call other dll ? I need to set [assembly:AllowPartiallyTrustedCallers] 3. I try to set my own web app dll for [assembly:AllowPartiallyTrustedCallers], it still got same error thanks for your help Gary
August 30th, 2012 1:43pm

I have one aspx page and one reportviewer was added. It is working fine with .net Trust Levels "Full". When in production server, .net Trust Levels was set High, it got this errors: Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers. Source Error: Line 17: <body> Line 18: <form id="OSWReportDisplay" runat="server"> Line 19: <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Line 20: Font-Size="8pt" Height="623px" ProcessingMode="Remote" Width="1355px" Line 21: AsyncRendering="False" ShowCredentialPrompts="true"> Source File: e:\temp\omnixx_sqlrpt\OSWReportDisplay.aspx Line: 19 Stack Trace: [SecurityException: That assembly does not allow partially trusted callers.] ASP.oswreportdisplay_aspx.__BuildControlReportViewer1() in e:\temp\omnixx_sqlrpt\OSWReportDisplay.aspx:19 1. how to configure to solve this problem. 2. ReportViewer will call other dll ? I need to set [assembly:AllowPartiallyTrustedCallers] 3. I try to set my own web app dll for [assembly:AllowPartiallyTrustedCallers], it still got same error thanks for your help Gary
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2012 1:43pm

We have one aspx page with one reportviewer in it. It is working fine with net trust levels: Full. In production server, its .net trust levels was set: High, it is not working. My question: Reportviewer is working in "net trust levels: High" in remote mode ? I knew it only works in "net trust levels: Full" in local mode. But in remote mode, it should work in .net trust levels: High or not ? thanksGary
August 30th, 2012 4:29pm

Hi Gary, Sorry for the delay. A strong named assembly includes the assembly's text name, four-part version number, culture information (if provided), a public key, and a digital signature stored in the assembly's manifest. To use strong-named assemblies with reports, we must allow the strong-named assembly to be called by partially trusted code using the assembly's AllowPartiallyTrustedCallers attribute. For the detailed information, please see: Using Strong-Named Custom Assemblies Based on the error message, it seems that the ReportViewer runs in remote processing mode. In this situation, the issue may occurs if you haven't granted FullTrust permission for your custom extension in the rssrvpolicy.config file. To avoid the issue, you can modify the code group like below: <CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="MyExtensionCodeGroup" Description="Code group for my data processing extension"> <IMembershipCondition class="UrlMembershipCondition" version="1" Url="C:\Program Files\Microsoft SQL Server\MSRS10_50.<Instance Name>\Reporting Services\ReportServer\bin\MyExtensionAssembly.dll" /> </CodeGroup> For more information, please see: How to: Deploy a Data Processing Extension to a Report Server Regards, Mike Yin TechNet Subscriber Support If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.Mike Yin TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2012 10:48pm

Hi Gary, Sorry for the delay. A strong named assembly includes the assembly's text name, four-part version number, culture information (if provided), a public key, and a digital signature stored in the assembly's manifest. To use strong-named assemblies with reports, we must allow the strong-named assembly to be called by partially trusted code using the assembly's AllowPartiallyTrustedCallers attribute. For the detailed information, please see: Using Strong-Named Custom Assemblies Based on the error message, it seems that the ReportViewer runs in remote processing mode. In this situation, the issue may occurs if you haven't granted FullTrust permission for your custom extension in the rssrvpolicy.config file. To avoid the issue, you can modify the code group like below: <CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="MyExtensionCodeGroup" Description="Code group for my data processing extension"> <IMembershipCondition class="UrlMembershipCondition" version="1" Url="C:\Program Files\Microsoft SQL Server\MSRS10_50.<Instance Name>\Reporting Services\ReportServer\bin\MyExtensionAssembly.dll" /> </CodeGroup> For more information, please see: How to: Deploy a Data Processing Extension to a Report Server Regards, Mike Yin TechNet Subscriber Support If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.Mike Yin TechNet Community Support
September 2nd, 2012 10:48pm

Hi Gary, Sorry for having misunderstood you in my initial reply. For your concern, I would like to explain that the High trust level in .NET Framework 3.5 and the Medium trust level in .NET Framework 4 contain the required permissions to run the ReportViewer control in remote processing mode. However, if you use the .NET Framework 2.0 in the Production environment, the ReportViewer control will not work. If it is .NET Framework 3.5 or .NET Framework 4 in your Production environment, I suggest you check the configue files have been modified correctly referring to the following article: Using the ASP.NET ReportViewer Control in Partial Trust Regards, Mike YinMike Yin TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2012 11:24pm

Hi Gary, Sorry for having misunderstood you in my initial reply. For your concern, I would like to explain that the High trust level in .NET Framework 3.5 and the Medium trust level in .NET Framework 4 contain the required permissions to run the ReportViewer control in remote processing mode. However, if you use the .NET Framework 2.0 in the Production environment, the ReportViewer control will not work. If it is .NET Framework 3.5 or .NET Framework 4 in your Production environment, I suggest you check the configue files have been modified correctly referring to the following article: Using the ASP.NET ReportViewer Control in Partial Trust Regards, Mike YinMike Yin TechNet Community Support
September 2nd, 2012 11:26pm

Hi Gary, Sorry for having misunderstood you in my initial reply. For your concern, I would like to explain that the High trust level in .NET Framework 3.5 and the Medium trust level in .NET Framework 4 contain the required permissions to run the ReportViewer control in remote processing mode. However, if you use the .NET Framework 2.0 in the Production environment, the ReportViewer control will not work. If it is .NET Framework 3.5 or .NET Framework 4 in your Production environment, I suggest you check the configue files have been modified correctly referring to the following article: Using the ASP.NET ReportViewer Control in Partial Trust Regards, Mike YinMike Yin TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2012 11:26pm

Hi Mike Yin, Thanks for your information. I have set up trust level from Full to High, and my report page is not working. I used visual studio 2008 with ..net framework v3.5 and deploy to production server .net framework v2.0. I guessed it is main reason for not working. I will update both server and my code to .net framework v4.0. I hope it will work after then. I will be back. thanks Gary
September 4th, 2012 7:31pm

Hi Mike Yin, Thanks for your information. I have set up trust level from Full to High, and my report page is not working. I used visual studio 2008 with ..net framework v3.5 and deploy to production server .net framework v2.0. I guessed it is main reason for not working. I will update both server and my code to .net framework v4.0. I hope it will work after then. I will be back. thanks Gary
Free Windows Admin Tool Kit Click here and download it now
September 4th, 2012 7:31pm

Mike Yin, Basically it is working after update visual studio to 2010, net framework V4 and my local IIS, choose asp.netV4 as application pool. When I select trust level=High, it is working fine in my local environment. But when I deploy it to my server, it has no visual studio 2010. I got errors: 1 First error is missing dll: Microsoft.ReportViewer.WebForms.dll After I copy this dll from my local machine to server at : ././myWebApp/bin This problem was goven. Then I got next error: 2. Request for the permission of type 'System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed In production server, it is working for Full trust, but got above for High trust. Do I need to copy some dll because there is no visual studio 2010 in this production server. Where I should put these dll, do I need to add them to GAC ? thanks Gary Gary
September 6th, 2012 3:38pm

My production has no visual studio. But .net framework v4.0 was installed. I guess it has no reportviewer v4.0. Do I need to install Microsoft Report Viewer 2010 in my production server? It is required to run .net framework v4.0 reportviewer ? thanks garyGary
Free Windows Admin Tool Kit Click here and download it now
September 6th, 2012 5:02pm

After I add below 2 dlls into GAC, it is working fine now. Microsoft.ReportViewer.WebForms Microsoft.ReportViewer.Common Thank you Mike Yin. Gary
September 7th, 2012 12:05pm

After I add below 2 dlls into GAC, it is working fine now. Microsoft.ReportViewer.WebForms Microsoft.ReportViewer.Common Thank you Mike Yin. Gary
Free Windows Admin Tool Kit Click here and download it now
September 7th, 2012 12:05pm

After I add below 2 dlls into GAC, it is working fine now. Microsoft.ReportViewer.WebForms Microsoft.ReportViewer.Common Thank you Mike Yin. Gary
September 7th, 2012 12:08pm

Hi Gary, I am glad to hear that you have resolved the issue. Thanks for your valuable feedback. When we host the ASP.NET application on-premise, the ReportViewer assemblies are usually installed directly in the global assembly cache (GAC) of the IIS server during Visual Studio installation, and can be accessed directly by the application. However, when we host the ASP.NET application in a SSRS report server in the cloud, it may not allow anything to be installed into the GAC, so we must make sure the ReportViewer assemblies are available locally for the application. To do this, we can add references to them in the project and configure them to be copied locally. For more information, you can refer to: How to: Use ReportViewer in a Web Site Hosted in Windows Azure Regards, Mike Yin Mike Yin TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
September 10th, 2012 9:41pm

Hi Gary, I am glad to hear that you have resolved the issue. Thanks for your valuable feedback. When we host the ASP.NET application on-premise, the ReportViewer assemblies are usually installed directly in the global assembly cache (GAC) of the IIS server during Visual Studio installation, and can be accessed directly by the application. However, when we host the ASP.NET application in a SSRS report server in the cloud, it may not allow anything to be installed into the GAC, so we must make sure the ReportViewer assemblies are available locally for the application. To do this, we can add references to them in the project and configure them to be copied locally. For more information, you can refer to: How to: Use ReportViewer in a Web Site Hosted in Windows Azure Regards, Mike Yin Mike Yin TechNet Community Support
September 10th, 2012 9:41pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics