开发者

Application with Lucene.net on server

开发者 https://www.devze.com 2022-12-14 01:49 出处:网络
I have a strange problem with my webapplication, it works on local host but not on our Server after reducing the code to a minimum there\'s a runtime error by declaring:

I have a strange problem with my webapplication, it works on local host but not on our Server

after reducing the code to a minimum there's a runtime error by declaring:

Dim directory As Lucene.Net.Store.Directory = FSDirectory.GetDirectory("\1[...]9\search\Start\luceneindex")

I also tried other paths like 127 or just "luceneindex"

-I'm working with Visualstudio 08. - the right asp.net version is declared on the server -i "published" the website and put the whole file on the server - i created a reference to the lucene.net.dll and its in the \bin file [at local host] --> by putting the whole file on the server lucene.net dll is 开发者_JS百科also there. It's a IIS server

Update:

I just noticed, that even

Dim analyzer As StandardAnalyzer = New StandardAnalyzer()

doesn't work.

But on the server there is the lucene.net.dll and my project should have a reference on that.

Any idea?


You path seems invalid due to unescaped '\' character. You can fix it by:

Dim directory As Lucene.Net.Store.Directory = FSDirectory.GetDirectory("\\1[...]9\\search\\Start\\luceneindex")

or

Dim directory As Lucene.Net.Store.Directory = FSDirectory.GetDirectory(@"\1[...]9\search\Start\luceneindex")

or

by using Path.Combine() method.

0

精彩评论

暂无评论...
验证码 换一张
取 消