从 Windows Server 2000 迁移到 2008,现在经典 ASP 目录查询无法正常工作
这让我发疯。
将我们旧的 Windows 2000 Web 服务器替换为 Windows 2008,这意味着迁移到 IIS7。
现在,除了我们在旧机器上设置的搜索目录之外,迁移进展顺利。
我添加了索引服务并为我们的网站创建了目录。
然而,现在查询目录的经典 ASP 页面表现得很奇怪。
具体来说,“vpath”和“doctitle”是空白的。其他字段可以正确返回,例如“特征”和“排名”,但其他字段则不然。
最烦人的是,每当我对搜索结果页面进行更改时,我都会收到此错误:
由于发生内部服务器错误,无法显示该页面。
...我必须等待重试前几秒钟。然后页面就会正常显示。很奇怪。
无论如何,这是经典的 ASP 代码:
Set objQuery = Server.CreateObject("ixsso.Query")
With objQuery
.Catalog = "Website"
.Columns = "doctitle, vpath, size, characterization, rank"
.SortBy = "rank[d], doctitle"
.MaxRecords = 50
End With
objQuery.Query = "(#filename *.asp) AND (@contents " & Request.Form("searchterms") & ")"
Set rsSystem = objQuery.CreateRecordset("nonsequential")
Do Until rsSystem.EOF
%><dt><a href="<% = rsSystem("vpath") %>"><% = rsSystem("doctitle") %></a></dt>
<dd><% = rsSystem("characterization") %>...</dd><%
rsSystem.MoveNext
Loop
还有其他人经历过这种情况吗?
谢谢。
This one is driving me crazy.
Replaced our old Windows 2000 web server with a Windows 2008 one which means moving to IIS7.
Now the move went smoothly except for the search catalogs we had set up on the old machine.
I added the Indexing Service and created the catalog for our website.
However, now the classic ASP page that queries the catalog is behaving strangely.
Specifically, the "vpath" and "doctitle" are blank. Other fields are being returned correctly like "characterization" and "rank" but others are not.
And the most annoying part is anytime I make a change to the search results page I get this error:
The page cannot be displayed because an internal server error has occurred.
...and I have to wait a couple of seconds before retrying. And then the page will come up fine. Very bizarre.
Anyway, here's the classic ASP code:
Set objQuery = Server.CreateObject("ixsso.Query")
With objQuery
.Catalog = "Website"
.Columns = "doctitle, vpath, size, characterization, rank"
.SortBy = "rank[d], doctitle"
.MaxRecords = 50
End With
objQuery.Query = "(#filename *.asp) AND (@contents " & Request.Form("searchterms") & ")"
Set rsSystem = objQuery.CreateRecordset("nonsequential")
Do Until rsSystem.EOF
%><dt><a href="<% = rsSystem("vpath") %>"><% = rsSystem("doctitle") %></a></dt>
<dd><% = rsSystem("characterization") %>...</dd><%
rsSystem.MoveNext
Loop
Anyone else experience this?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该做的第一件事是启用 IIS 的详细错误,以指示具体是哪行代码导致此错误。
请阅读下页的“2) 启用 IIS7 详细错误”部分,并尝试一下。我希望它会对你有所帮助。
http://mvolo .com/blogs/serverside/archive/2007/07/26/Troubleshoot-IIS7-errors-like-a-pro.aspx
The first thing you should do is to Enable IIS's detailed errors, to indicate which line of code is causing this error specifically.
Read the following page's "2) Enable IIS7 detailed errors" section, and give it a try. I hope it will help you some.
http://mvolo.com/blogs/serverside/archive/2007/07/26/Troubleshoot-IIS7-errors-like-a-pro.aspx