This is a migrated thread and some comments may be shown as answers.

Security Exception - System.Web.AspNetHostingPermission

1 Answer 152 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Carlos
Top achievements
Rank 1
Carlos asked on 18 Nov 2011, 10:24 PM
Hi,

Because of some incompatibilities to IE9, we had to upgrade Telerik Ajax controls recently from 2009.3.1103.35 to 2011.2.915.35.

It worked fine locally and on the Beta server but it won't work on the Live environment where we have the files on a net share.

It works properly with the old Telerik version though. We DO have IntranetZone set as FullTrust as indicated in similar posts. Otherwise even the old version of Telerik controls wouldn't work.

Could you please advise? We need this upgrade up and running as soon as possible so that the IE9 users can make use of the Teletik controls.

Thank you,
Carlos Guarany

Server Error in '/' Application.

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: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Reflection.Assembly._GetExportedTypes() +0
   System.Web.Compilation.BuildResultMainCodeAssembly.FindAppInitializeMethod() +41
   System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +11201354
   System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +185
   System.Web.Compilation.BuildManager.CompileCodeDirectories() +654
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +658


Version Information: Microsoft .NET Framework Version:2.0.50727.4963; ASP.NET Version:2.0.50727.4955

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 23 Nov 2011, 01:46 PM
Hello Carlos,

Based on the supplied information it is hard to say what is causing the described issue at your end. Could you please elaborate a bit more on your scenario. How do you bind the RadGrid? What data source do you use?  Also it will be helpful if you post your aspx page markup with the related code behind file or send us a small runnable example which demonstrates the described issue. Thus we will be able to gather more details about your scenario, debug the application and investigate the problem.
Looking forward for your reply.

Regards,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
General Discussions
Asked by
Carlos
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or