rdlc System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.Stron gNameIdentityPermission
Hi,
I am using rdlc reports for my web application ,locally every thing work fine , i have published the web application in a hosting environment where
i dont have an access to the server, the web application work fine except for the rdlc reports i get the following exception:
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
i tried to search the web , but no luck,every thing i found as seems to be related to the reporting sever and of course i dont have one
coz i am using rdlc reports.
any help
Note: I have post this thread in the asp.net forum, but i could not get any replies (link)
Matelin
May 9th, 2011 10:16am
Are you using a third party control in your reports? What version of SQL Server including Service Pack are you using?
Free Windows Admin Tool Kit Click here and download it now
May 9th, 2011 8:47pm
Hi Matelin,
Based on the error message, the issue is most likely a permission problem between the web application and the rdlc file. When you run the code from your local machine, this will be the MyComputer zone, but when you run it off of a server, or even a network
share mapped to a drive on your machine, it will be the LocalIntranet zone.
By default any code that is run from the MyComputer zone will get a permission set of FullTrust (unrestricted permission to do anything it pleases). However, by default, there is a more restrictive permission set given to LocalIntranet assemblies.
For detailed explanation and solution, please kindly refer to the article below,
My application works from my local machine, but throws a SecurityException when I move it to a network share:
http://blogs.msdn.com/b/shawnfa/archive/2003/06/20/57023.aspx
If you have any question, please feel free to ask.
Thanks,
Eileen
May 12th, 2011 10:59am
Sorry for late reply,
the problem is a permission issue as Eileen says but the explanation is as follow:
local reports must run in an application with a full trust level ,for details about application trust level, i found this good article:
http://www.4guysfromrolla.com/articles/100307-1.aspx
and my hosting company which is godaddy by the way, runs its shared hosting accounts in a medium trust level,so i wrote to the support
for workaround and this is the reply i got:
<--
You may downgrade to ASP.NET 1.1 to make use of Full Trust on our shared hosting plans. You may also switch to a Virtual Dedicated Server or Dedicated Server
to use full trust as well.
At this time, is no work around. All hosting accounts with 2.0-4.0 ASP.Net are set to Medium Trust and we do not allow Full Trust on these accounts.
-->
so i could not change the application trust level, and i could not found any valid solution to run local reports on a medium trust,
if any one have found a solution to run local reports in a medium trust please reply,if not i have to change my hosting
company.Matelin
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2011 8:32pm
Hi Matelin ,
You are right, local mode requires full trust. Remote mode only requires medium trust.
Additionally, if you have any concern about this, please submit a feedback at
http://connect.microsoft.com/SQLServer/Feedback and hope Microsoft improve this feature in the next service pack or product release.
Thanks for your understanding.
Thanks,
Eileen
May 20th, 2011 3:19am