Solved

Required permissions cannot be acquired

Posted on 2009-07-09
2
1,008 Views
Last Modified: 2013-12-25
Hi

I am trying the WebSurvey www.codeplex.com/WebSurvey/ control, but when I try it on hosting companies (1and1 and AspNix) both throw the following exception....

What can I do to resolve this? (prefer not to have to get another host!)

Thanks in advance
Server Error in '/' Application.

--------------------------------------------------------------------------------
 

Required permissions cannot be acquired. 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
 

Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired.
 

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: 
 
 

[PolicyException: Required permissions cannot be acquired.]

   System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +7604211

   System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57
 

[FileLoadException: Could not load file or assembly 'sstchur.web.survey, Version=2.7.0.1, Culture=neutral, PublicKeyToken=8e251e8fe3834555' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]

   System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0

   System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43

   System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127

   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142

   System.Reflection.Assembly.Load(String assemblyString) +28

   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
 

[ConfigurationErrorsException: Could not load file or assembly 'sstchur.web.survey, Version=2.7.0.1, Culture=neutral, PublicKeyToken=8e251e8fe3834555' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]

   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613

   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203

   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105

   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178

   System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +163

   System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +53

   System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175

   System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +83

   System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261

   System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101

   System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +126

   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +62

   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33

   System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40

   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +160

   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93

   System

Open in new window

0
Comment
Question by:rwallacej
2 Comments
 
LVL 15

Accepted Solution

by:
Praveen Venu earned 500 total points
ID: 24820701
Here is the solution from codeplex itself

Solution : I downloaded source code via SVN (you must use VS2008 to do so, VS2005 won't help). Then from Project/sstchur.web.survey Properties selected Build tab and unchecked Allow unsafe code checkbox. Finally recompiled the dll and used it. The error message is gone afterwards.

http://websurvey.codeplex.com/Thread/View.aspx?ThreadId=57721

-----------------------------------------------------
Mark as solution if it help you
0
 

Author Closing Comment

by:rwallacej
ID: 31601748
thank-you kindly for help,
regards,
rwallacej
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
Even if you have implemented a Mobile Device Management solution company wide, it is a good idea to make sure you are taking into account all of the major risks to your electronic protected health information (ePHI).
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now