当我请求带有映射到ASP.NET ISAPI扩展的扩展名的URL时,IIS6表现得很奇怪

时间:2021-02-25 03:35:20

I tried to deploy an ASP.NET application in IIS6. I created a virtual directory MyApp, mapped it to a folder on the hard drive, copied all the stuff from my application to that folder.

我试图在IIS6中部署ASP.NET应用程序。我创建了一个虚拟目录MyApp,将其映射到硬盘驱动器上的文件夹,将所有内容从我的应用程序复制到该文件夹​​。

Now when I request http://host/MyApp/ I get HTTP 403 and that request is logged in the IIS log. When I request http://host/MyApp/default.aspc (there's no such file) I get HTTP 404 and that request is also logged.

现在,当我请求http:// host / MyApp / I时,获取HTTP 403并在IIS日志中记录该请求。当我请求http://host/MyApp/default.aspc(没有这样的文件)时,我得到了HTTP 404,并且还记录了该请求。

But when I request http://host/MyApp/default.aspx (that file is present in the folder which the virtual directory is mapped to) Internet Explorer just says it "cannot display the web page", that request is not logged. When I trace requests with Fiddler it shows empty reply and HTTP code 0 on the client side. .aspx extension is of course mapped onto ASP.NET ISAPI extension.

但是当我请求http://host/MyApp/default.aspx(该文件存在于虚拟目录映射到的文件夹中)时,Internet Explorer只是说“无法显示网页”,则不会记录该请求。当我使用Fiddler跟踪请求时,它在客户端显示空回复和HTTP代码0。 .aspx扩展当然映射到ASP.NET ISAPI扩展。

ASP.NET 2.0 is installed into IIS. When I run aspnet_regiis -lk it produces the following output:

ASP.NET 2.0已安装到IIS中。当我运行aspnet_regiis -lk时,它会产生以下输出:

W3SVC/  2.0.50727.0
W3SVC/1/ROOT/   2.0.50727.0
W3SVC/2/Root/   2.0.50727.0 

What's wrong? Why does IIS6 behave so strangely when I request files mapped to ASP.NET ISAPI and how do I resolve this?

怎么了?当我请求映射到ASP.NET ISAPI的文件时,为什么IIS6表现得如此奇怪?如何解决这个问题?

3 个解决方案

#1


3  

This particular oddity is normally caused by ASP.NET not being enabled under "Web Service Extensions"

这种特殊的奇怪现象通常是由于“Web服务扩展”下没有启用ASP.NET引起的

Steps:

  1. Control Panel > Administrative Tools > IIS Manager
  2. 控制面板>管理工具> IIS管理器

  3. Expand the machine node in the tree
  4. 展开树中的机器节点

  5. Click on "Web Service Extensions"
  6. 单击“Web服务扩展”

  7. Right-click on the appropriate ASP.NET version in the list to the right and choose "Allow"
  8. 右键单击右侧列表中相应的ASP.NET版本,然后选择“允许”

Hopefully this is the issue you're having!

希望这是你遇到的问题!

#2


1  

I apologise if these seem like obvious questions:

如果这些似乎是明显的问题,我道歉:

Have you checked to make sure that the ASP.NET extensions really are mapped to the ASP.NET ISAPI extension in the virtual directory itself:

您是否已检查以确保ASP.NET扩展确实映射到虚拟目录本身中的ASP.NET ISAPI扩展:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll

Is the correct version of ASP.NET installed, if at all?

是否安装了正确的ASP.NET版本?

Also, is this folder a virtual directory (icon has a folder with a globe) or is it an application (icon is a gear).

此外,此文件夹是虚拟目录(图标具有带球体的文件夹)还是应用程序(图标是齿轮)。

If it's Virtual Directory then you need to make sure your /bin folder and web.config are in the site root.

如果是虚拟目录,则需要确保/ bin文件夹和web.config位于站点根目录中。

#3


1  

Although Google searches show that the typical reason is ASP.NET being misconfigured in my specific case the reason was Windows Sharepoint Services 3, installed onto the same machine. Once it has been installed, ASP.NET applications seem to no longer work. Reinstalling .NET and IIS doesn't help.

尽管Google搜索显示典型的原因是ASP.NET在我的特定情况下配置错误,但原因是Windows Sharepoint Services 3安装在同一台计算机上。安装完成后,ASP.NET应用程序似乎不再有效。重新安装.NET和IIS没有帮助。

#1


3  

This particular oddity is normally caused by ASP.NET not being enabled under "Web Service Extensions"

这种特殊的奇怪现象通常是由于“Web服务扩展”下没有启用ASP.NET引起的

Steps:

  1. Control Panel > Administrative Tools > IIS Manager
  2. 控制面板>管理工具> IIS管理器

  3. Expand the machine node in the tree
  4. 展开树中的机器节点

  5. Click on "Web Service Extensions"
  6. 单击“Web服务扩展”

  7. Right-click on the appropriate ASP.NET version in the list to the right and choose "Allow"
  8. 右键单击右侧列表中相应的ASP.NET版本,然后选择“允许”

Hopefully this is the issue you're having!

希望这是你遇到的问题!

#2


1  

I apologise if these seem like obvious questions:

如果这些似乎是明显的问题,我道歉:

Have you checked to make sure that the ASP.NET extensions really are mapped to the ASP.NET ISAPI extension in the virtual directory itself:

您是否已检查以确保ASP.NET扩展确实映射到虚拟目录本身中的ASP.NET ISAPI扩展:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll

Is the correct version of ASP.NET installed, if at all?

是否安装了正确的ASP.NET版本?

Also, is this folder a virtual directory (icon has a folder with a globe) or is it an application (icon is a gear).

此外,此文件夹是虚拟目录(图标具有带球体的文件夹)还是应用程序(图标是齿轮)。

If it's Virtual Directory then you need to make sure your /bin folder and web.config are in the site root.

如果是虚拟目录,则需要确保/ bin文件夹和web.config位于站点根目录中。

#3


1  

Although Google searches show that the typical reason is ASP.NET being misconfigured in my specific case the reason was Windows Sharepoint Services 3, installed onto the same machine. Once it has been installed, ASP.NET applications seem to no longer work. Reinstalling .NET and IIS doesn't help.

尽管Google搜索显示典型的原因是ASP.NET在我的特定情况下配置错误,但原因是Windows Sharepoint Services 3安装在同一台计算机上。安装完成后,ASP.NET应用程序似乎不再有效。重新安装.NET和IIS没有帮助。