How do I make Lucene.NET 2.3.2 run in a medium trust environment? GoDaddy doesn't like it the way it is.
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- Generic Generics in Managed C++
- How to store image outside of the website's ro
- How to Debug/Register a Permanent WMI Event Which
- 'System.Threading.ThreadAbortException' in
It should work. Lucene.NET was made compatible with a medium trust environment in commits 788091 and 788092, which went into the 2.3.2 release. You can verify this by looking at the history of the 2.3.2 tag with your favorite Subversion client.
I have just posted this question within the lucene users group and it has been recommended that you use the following:-
I just recently struggled with this, and wanted to update this with a solution I got to work. I pulled down the latest code and built it myself so I could make changes if needed. In the SupportClass.cs file, starting at line 481 there is some code that verifies a file buffer has been flushed using unmanaged code.
I commented out these lines and rebuilt the library and was able to run in medium trust. I ran locally in medium trust, as well as putting together a simple test app deployed to GoDaddy. I'm not sure what the implications are of removing these lines. They appear to be duplicating the behavior of the
fileStream.Flush()
call that precedes this block, but I'm not sure.