当前位置: 代码迷 >> ASP.NET >> 本地使用盘古分词正常服务器不行解决办法
  详细解决方案

本地使用盘古分词正常服务器不行解决办法

热度:3169   发布时间:2013-02-25 00:00:00.0
本地使用盘古分词正常服务器不行
网站站内搜索是使用lucene.net + 盘古分词,在本地测试正常,但是传到服务器后出现错误。

Dictionaries文件夹和PanGu.xml都放在bin目录

本地创建索引,查询关键词都可以。上传到服务器后报以下错误

HTML code
Server Error in '/' Application.Access to the path 'D:\1\823830\bin\' is denied. [b]Description[/b]: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. [b]Exception Details[/b]: System.UnauthorizedAccessException: Access to the path 'D:\1\823830\bin\' is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.[b]Source Error[/b]: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  Stack Trace: [UnauthorizedAccessException: Access to the path 'D:\1\823830\bin\' is denied.]   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +9717806   System.IO.Directory.SetCurrentDirectory(String path) +9433166   [color=#FF0000]PanGu.Setting.PanGuSettings.GetDictionaryPath() +26   PanGu.Segment.LoadDictionary() +51   PanGu.Segment.Init(String fileName) +130[/color]   Lucene.Net.Analysis.PanGu.PanGuTokenizer.InitPanGuSegment() +16   Lucene.Net.Analysis.PanGu.PanGuTokenizer..ctor() +63   PanGu.Lucene.Search.Index.Search(String indexDir, String q, Int32 pageLen, Int32 pageNo, Int32& recCount) +199





------解决方案--------------------------------------------------------
我感觉是路径问题吧。本地和服务器路径肯定不一样啊。
------解决方案--------------------------------------------------------
我感觉傻傻的
------解决方案--------------------------------------------------------
探讨
网站站内搜索是使用lucene.net + 盘古分词,在本地测试正常,但是传到服务器后出现错误。

Dictionaries文件夹和PanGu.xml都放在bin目录

本地创建索引,查询关键词都可以。上传到服务器后报以下错误

HTML code


Server Error in '/' Application.


Access to the path 'D:\1\823830……

------解决方案--------------------------------------------------------
看样子是权限的问题 啊。
  相关解决方案