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

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

Hi Christopher,

I confirm the fix! But there is a similar error happening that seems to be 
coming from Lucene.Net.Contrib.Highlighter.dll

I also use Lucene.Net.Contrib.Analyzers.dll but since we are configured for use 
of StandardAnalyzer by default I'm not sure if there is any problem with it. I 
haven't seen one so far.

If I comment out the code that uses it to highlight search results, it works, 
but with that code included it gives a security error.

[SecurityException: That assembly does not allow partially trusted callers.]
   mojoPortal.SearchIndex.IndexHelper.Search(Int32 siteId, Boolean 
isAdminContentAdminOrSiteEditor, List`1 userRoles, Guid featureGuid, DateTime 
modifiedBeginDate, DateTime modifiedEndDate, String queryText, Boolean 
highlightResults, Int32 highlightedFragmentSize, Int32 pageNumber, Int32 
pageSize, Int32 maxClauseCount, Int32& totalHits, Boolean& invalidQuery) in 
c:\_joe\__projects\__mojoportal\_code\joedev\Web\Components\SearchIndex\IndexHelper.cs:1414
   mojoPortal.Web.UI.Pages.SearchResults.DoSearch() in 
c:\_joe\__projects\__mojoportal\_code\joedev\Web\SearchResults.aspx.cs:268
   mojoPortal.Web.UI.Pages.SearchResults.SetupInternalSearch() in 
c:\_joe\__projects\__mojoportal\_code\joedev\Web\SearchResults.aspx.cs:183
   mojoPortal.Web.UI.Pages.SearchResults.Page_Load(Object sender, EventArgs e) 
in c:\_joe\__projects\__mojoportal\_code\joedev\Web\SearchResults.aspx.cs:120
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   mojoPortal.Web.mojoBasePage.OnLoad(EventArgs e) in 
c:\_joe\__projects\__mojoportal\_code\joedev\Web\Components\mojoBasePage.cs:832
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, 
Boolean includeStagesAfterAsyncPoint) +6785
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, 
Boolean includeStagesAfterAsyncPoint) +242
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.searchresults_aspx.ProcessRequest(HttpContext context) +4
   
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
 +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& 
completedSynchronously) +75

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

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
>
>         Attachments: VerifyableAssemblyNET35.zip
>
>
> 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

Reply via email to