DotNetInvoice Forums

DotNetInvoice Invoicing Script Discussion Forum
Welcome to DotNetInvoice Forums Sign in | Join | Help
in Search

Medium Trust

Last post 11-14-2007, 9:11 PM by support. 3 replies.
Sort Posts: Previous Next
  •  10-19-2007, 7:00 PM 184

    Medium Trust

    I'm having problems getting DNI to run in medium trust.. Any and all help is appreciated!  This error is generated:

     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) +2796809
       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 'Olvio.Ecommerce.AuthorizeNet, Version=1.5.0.0, Culture=neutral, PublicKeyToken=7efdd24960d5f3a7' 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.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211
       System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141
       System.Reflection.Assembly.Load(String assemblyString) +25
       System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32

    [ConfigurationErrorsException: Could not load file or assembly 'Olvio.Ecommerce.AuthorizeNet, Version=1.5.0.0, Culture=neutral, PublicKeyToken=7efdd24960d5f3a7' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
       System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +596
       System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +3596761
       System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +46
       System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +177
       System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +180
       System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +350
       System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125
       System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +441

    [HttpException (0x80004005): Could not load file or assembly 'Olvio.Ecommerce.AuthorizeNet, Version=1.5.0.0, Culture=neutral, PublicKeyToken=7efdd24960d5f3a7' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
       System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +57
       System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +612
       System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +521

    [HttpException (0x80004005): Could not load file or assembly 'Olvio.Ecommerce.AuthorizeNet, Version=1.5.0.0, Culture=neutral, PublicKeyToken=7efdd24960d5f3a7' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3540923
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +69
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +669

     

  •  11-06-2007, 8:51 AM 194 in reply to 184

    Re: Medium Trust

    Pictoric,

    We haven't tried running DNI in medium trust, and my understanding of the 3rd party Authorize.NET component used is that it won't run in medium trust. I've emailed Olvio about this in the past but they did not resolve the issue.

    I apologize for the trouble. If this means you cannot run our software please contact us at support@dotnetinvoice.com and I can provide you with a refund. 


    ---
    Rob
    DotNetInvoice Support
  •  11-14-2007, 2:22 PM 202 in reply to 194

    Re: Medium Trust

    I moved my installation onto a different server that isn't shared, so I'm OK...  It would be nice to be able to run this application in Medium Trust..   Also, just an FYI, the following code from da.vb can not be run in medium trust:

     

     oConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~/")

     You have to use the configurationmanager.connectionstring  in medium trust.

  •  11-14-2007, 9:11 PM 203 in reply to 202

    Re: Medium Trust

    Thanks for the info. I've added this to our issue tracker and we'll get this patched for the next release.

    Our reliance on the Olvio Authorize.NET dll means we still won't be able to run in medium trust environment, but at some point if we decide to re-write their code we'll be in a better place to make it work.

    Thanks again, 


    ---
    Rob
    DotNetInvoice Support
View as RSS news feed in XML
Powered by Community Server (Personal Edition), by Telligent Systems