I've just installed my app on a new server and I'm getting the following error in a NeatUpload module ....
Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=188.8.131.52, 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 Brettle.Web.NeatUpload.UploadHttpModule.GetCurrentWorkerRequest() at Brettle.Web.NeatUpload.UploadHttpModule.Application_BeginRequest(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean completedSynchronously)
I'm a bit out of my depth with security issues, so please can you help.
Sounds like the server only provides "medium" trust to your app. To use NeatUpload, you need to either have "full" trust, or you need to have the server admin install Brettle.Web.NeatUpload.dll in the GAC. See Using NeatUpload in a Medium Trust Environment.
Dean - my client's web host replied with the following when asked to allow full trust...
Thank you for your query
To maintain the security sof your website, and other websites on our servers DLL' requiring full trust levels will not operate on our servers. Attempting to run a DLL that requires a full trust level will result in an error message similar to the following:
* Security Exception Description: The application attempted to perform an operation not allowed by the security policy
* Error: "The current trust level does not allow use of the attribute"
You should check whether your third party DLL has a version available that supports partial trusted callers. If you receive this error when running your own dll's you should ensure that the AssemblyInfo (eg AssemblyInfo.cs for c#) file has the following before your project is compiled:
Unfortunately we are unable to provide additional services on our shared hosting platform, if you wish to use an unsupported DLL, or need to run a DLL with full trust level you should consider a dedicated server, where you have full control over the configuration of your hosted .NET platform.
Can you offer any help?
All ASP.NET upload progress controls that don't require Flash need full trust. It is an asp.net limitation, not a NeatUpload limitation. All I can usggest is to consider a different hosting provider. SoftSys seems to allow Full-Trust hosting if you request it and seems to be getting good reviews. I have no persona experience with them though. --Dean