Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
igUpload and Code Access Security
posted

I am currently using 14.2 and my client uses code access security.

When I add the Web Upload control, I get the following Exception:

System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
   at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
   at System.Security.CodeAccessPermission.Demand()
   at System.Web.HttpContext.System.IServiceProvider.GetService(Type service)
   at Infragistics.Web.Mvc.UploadModule.GetWorkerRequest(HttpContext context)
   at Infragistics.Web.Mvc.UploadModule.OnBeginRequest(Object sender, EventArgs e)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

The demand was for: IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode"

We cannot allow unmanaged code to run, so adding the entry to the CAS Profile is not an option. When I test locally (without CAS), it works.

Is there a flag that can be set or another work around? The control meets the requirements of the project and I would like to leverage it (using other IgniteUI tools in the site) instead of using a different 3rd party control or building one from scratch.

Any help will be appreciated!

Parents
No Data
Reply
  • 2525
    posted

    Hello Dennis,

    The WebUpload control does not require the UnamanagedCode flag to be set to run. This is most likely caused by a configuration issue in IIS. In the WebUpload Overview of the documentation, it goes over how to properly set the web.config to work with IIS.

    Here's a relevant link on how to debug this sort of issue:

    http://help.infragistics.com/doc/ASPNET?page=Web_How_Do_I_Know_if_a_Problem_is_Security_Policy_Related.html

Children
No Data