lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Audette (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LUCENENET-500) Lucene fails to run in medium trust ASP.NET Application
Date Thu, 14 Feb 2013 21:03:12 GMT

    [ https://issues.apache.org/jira/browse/LUCENENET-500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13578672#comment-13578672
] 

Joe Audette edited comment on LUCENENET-500 at 2/14/13 9:03 PM:
----------------------------------------------------------------

Hi,

3.0.3 seems to work fine under .NET 4 medium trust but it is not working under .NET 3.5 medium
trust
Can someone fix this?

[PolicyException: Required permissions cannot be acquired.]
   System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset,
PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission)
+7610179
   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 'Lucene.Net, Version=3.0.3.0, Culture=neutral,
PublicKeyToken=85089178b9ac3181' 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 'Lucene.Net, Version=3.0.3.0,
Culture=neutral, PublicKeyToken=85089178b9ac3181' 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.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization,
String outputAssemblyName) +54
   System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir,
CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean
isDirectoryAllowed) +600
   System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType
dirType, String assemblyName, StringSet excludedSubdirectories) +125
   System.Web.Compilation.BuildManager.CompileResourcesDirectory() +31
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +304

[HttpException (0x80004005): Could not load file or assembly 'Lucene.Net, Version=3.0.3.0,
Culture=neutral, PublicKeyToken=85089178b9ac3181' or one of its dependencies. Failed to grant
minimum permission requests. (Exception from 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): Could not load file or assembly 'Lucene.Net, Version=3.0.3.0,
Culture=neutral, PublicKeyToken=85089178b9ac3181' or one of its dependencies. Failed to grant
minimum permission requests. (Exception from HRESULT: 0x80131417)]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8929163
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext
context) +333

Version Information: Microsoft .NET Framework Version:2.0.50727.6400; ASP.NET Version:2.0.50727.6387

Thanks,

Joe
                
      was (Author: joeaudette):
    Hi,

3.0.3 seems to work fine under .NET 4 medium trust but it is not working under .NET 3.5 medium
trust
Can someone fix this?

Thanks,

Joe
                  
> Lucene fails to run in medium trust ASP.NET Application
> -------------------------------------------------------
>
>                 Key: LUCENENET-500
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-500
>             Project: Lucene.Net
>          Issue Type: Bug
>          Components: Lucene.Net Core
>    Affects Versions: Lucene.Net 3.0.3
>            Reporter: Simon Svensson
>            Assignee: Christopher Currens
>             Fix For: Lucene.Net 3.0.3
>
>
> I'm having trouble upgrading a web application running under medium trust from 2.9.4
to 3.0.3. Code that previously worked now throws a SecurityException.
> [SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
>    Lucene.Net.Support.WeakKey`1..ctor(T key) +0
>    Lucene.Net.Support.WeakDictionary`2.get_Item(TKey key) +113
>    Lucene.Net.Util.DefaultAttributeFactory.GetClassForInterface() +178
>    Lucene.Net.Util.DefaultAttributeFactory.CreateAttributeInstance() +95
>    Lucene.Net.Util.AttributeSource.AddAttribute() +375
>    Lucene.Net.Analysis.CharTokenizer..ctor(TextReader input) +126
>    Lucene.Net.Analysis.WhitespaceTokenizer..ctor(TextReader in) +37

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message