lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Audette (JIRA)" <>
Subject [jira] [Commented] (LUCENENET-500) Lucene fails to run in medium trust ASP.NET Application
Date Wed, 20 Feb 2013 19:09:13 GMT


Joe Audette commented on LUCENENET-500:

mojoPortal is a large app, its probably going to be easier for me to test it for you here.
The code in our repository currently uses conditional compilation in a lot of places in the
2 main files where we use Lucene because of the syntax differences between the older version
of Lucene.NET used by our 3.5 builds and the new version used in .NET 4 builds. I've kept
a copy of those files modified to test with the dll you provided so I can restore them and
try again with your next update. But the app fails to load its not failing at code that uses
lucene, it never gets there and that code is not invoked just to run the app its only invoked
at search time and when content is updated and we update the search index. Just having code
that depends on lucene seems to be enough to break it in medium trust .NET 3.5.

If you want to see the code to get an idea of what we are doing the 2 main files are:

We also use the highlighter and analyzers from contrib. By default we use the standardanalyzer
but its configurable to use other ones.

Just let me know if you get to a point where you need me to test again.


> Lucene fails to run in medium trust ASP.NET Application
> -------------------------------------------------------
>                 Key: LUCENENET-500
>                 URL:
>             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
>         Attachments:
> 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=, 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:

View raw message