It's the App_Data folder of a web app... it *should* have write access to it. I'll check it out Simo
On Wed, Feb 10, 2010 at 9:12 PM, Digy <[email protected]> wrote: > Hi Simone, > > Can you try to open/create a file in that directory within your app(without > using Lucene.NET) to narrow down the source of the problem. > > DIGY > > -----Original Message----- > From: Simone Chiaretta [mailto:[email protected]] > Sent: Wednesday, February 10, 2010 9:46 PM > To: lucene-net-user > Subject: Lucene.net in Medium Trust > > Hi all, > we are starting to do the final testing with the new release of Subtext > which has a Lucene.net based search engine. > But we are finding a strange error, related to a SecurityPermission when > running in medium trust > > there is the stack trace of the error: > > [SecurityException: Request for the permission of type > 'System.Security.Permissions. > SecurityPermission, mscorlib, > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' > failed.] > FileSupport.Sync(FileStream fileStream) +0 > Lucene.Net.Store.FSDirectory.Sync(String name) +151 > Lucene.Net.Index.SegmentInfos.FinishCommit(Directory dir) +171 > Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean > create, Boolean closeDir, IndexDeletionPolicy deletionPolicy, Boolean > autoCommit, Int32 maxFieldLength, IndexingChain indexingChain, > IndexCommit commit) +257 > Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean > closeDir, IndexDeletionPolicy deletionPolicy, Boolean autoCommit, > Int32 maxFieldLength, IndexingChain indexingChain, IndexCommit commit) > +110 > Lucene.Net.Index.IndexWriter..ctor(Directory d, Analyzer a, > MaxFieldLength mfl) +369 > > > Subtext.Framework.Services.SearchEngine.SearchEngineService.EnsureIndexWrite > r() > in SearchEngineService.cs:93 > > The line of code that causes the error is > > _writer = new IndexWriter(_directory, > _analyzer,IndexWriter.MaxFieldLength.UNLIMITED); > > where _directory is > FSDirectory.Open(new > DirectoryInfo(HttpContext.Server.MapPath("~/App_Data")))) > > We are using one of the latest versions (retrieved from the trunk around > the > beginning of January) .. 2.9.1 I guess > > I read you should have fixed the problem in 2.3.2 ( > http://issues.apache.org/jira/browse/LUCENENET-169) but this problem is > happening again here. > > Any idea on what is happening here? > > Thx > Simone > > -- > Simone Chiaretta > Microsoft MVP ASP.NET - ASPInsider > Blog: http://codeclimber.net.nz > RSS: http://feeds2.feedburner.com/codeclimber > twitter: @simonech > > Any sufficiently advanced technology is indistinguishable from magic > "Life is short, play hard" > > -- Simone Chiaretta Microsoft MVP ASP.NET - ASPInsider Blog: http://codeclimber.net.nz RSS: http://feeds2.feedburner.com/codeclimber twitter: @simonech Any sufficiently advanced technology is indistinguishable from magic "Life is short, play hard"
