We have a old (2011) Web Form application running at a hosting service on Windows 2003. Last friday they change the environment from Full Trust to Medium Trust. After that the application works for a few time and then freezes the IIS pool of the application. After many tests, including a new pool for the application, the techs of the hosting service identity the problem in the Npgsql (version 2.0).The Npgsql 2.0 works in Medium Trust? Is there something extra required?
--
You received this message because you are subscribed to the Google Groups "Npgsql Help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to npgsql-help...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/npgsql-help/686fa4c8-a814-4408-b094-4a1b64841b94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I remember we had a problem with medium trust. I remember we fixed that by changing the setting I anthem assemblyinfo. I think this change was after 2.0 version.
Max, did you try using a new 2.1.x or even 2.2.x version and see if it works?
You shouldn't need to worry about compatibility as 2.1.x and 2.2.x should work just in as 2.0. You can try first 2.1.x and if it's OK, you can change to 2.2.4.
I hope it helps.
To view this discussion on the web visit https://groups.google.com/d/msgid/npgsql-help/CADT4RqCHT7KeKUnF8_c2erhCguzMMtoccTHjbB8L8UT8BMRqHA%40mail.gmail.com.
[PolicyException: Não é possível obter permissões obrigatórias.] System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +7613891 System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57 [FileLoadException: Não foi possível carregar arquivo ou assembly 'Mono.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' ou uma de suas dependências. Falha ao conceder solicitações de permissão mínima. (Exceção de 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: Não foi possível carregar arquivo ou assembly 'Mono.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' ou uma de suas dependências. Falha ao conceder solicitações de permissão mínima. (Exceção de 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.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54 System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +232 System.Web.Compilation.BuildManager.CompileGlobalAsax() +51 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +337 [HttpException (0x80004005): Não foi possível carregar arquivo ou assembly 'Mono.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' ou uma de suas dependências. Falha ao conceder solicitações de permissão mínima. (Exceção de HRESULT: 0x80131417)] System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729 [HttpException (0x80004005): Não foi possível carregar arquivo ou assembly 'Mono.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' ou uma de suas dependências. Falha ao conceder solicitações de permissão mínima. (Exceção de HRESULT: 0x80131417)] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8995651 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333
If Shay's suggestion doesn't work, I think another possibility would be to recompile the code after removing all code references to mono.security.
I think this change isn't very complex.
It's not ideal, but could help you get your site working while you wait for the version 3 which won't have mono.security dependency.
I hope it helps.
--
You received this message because you are subscribed to the Google Groups "Npgsql Help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to npgsql-help...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/npgsql-help/c241ee04-856e-43d4-8783-8f7aa9a38a7d%40googlegroups.com.