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] [Commented] (LUCENENET-500) Lucene fails to run in medium trust ASP.NET Application
Date Tue, 19 Feb 2013 22:41:12 GMT

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

Joe Audette commented on LUCENENET-500:
---------------------------------------

Hi Christopher,

Thanks for the quick attention on this. I use Lucene.NET for the search engine in mojoPortal
CMS, in the latest release we upgraded to the latest Lucene.NET. I learned of this problem
after our latest release when we got a bug report.
https://www.mojoportal.com/Forums/Thread.aspx?pageid=5&t=11371~1

>From the stacktrace of the error it is failing to load the assembly so it never got to
mojoPortal code. The web app crashes completely as a result of the error, it doesn't run at
all. We use the Simple FS Directory and the index files live in a folder below the root of
the web app that is writable.

I was able to reproduce the same result on my local machine by adding this in the Web.config
file in the <system.web> section: <trust level="Medium" originUrl=".*" />

Our .NET 4 package works fine under medium trust with Lucene.NET version 3.0.3.

I've since been able to patch our package for .NET 3.5 to use the old version 2.1.0.3 of Lucene.NET
that we were using before to solve the problem for our users. But it was an ugly fix with
lots of conditional compilation so I'm going to be glad to have the official fix so I can
clean that up.

I'd be happy to test and confirm the fix if you want to make updated dlls available to me.


Best Regards,

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