为什么aspx文件会返回404("无法找到页面")

BIB*_*IBD 34 asp.net

为什么当我通过IE6 访问aspx(例如,http://www.example.com/foo.aspx-而不是真实站点)时,我会在IIS6中收到404错误(即"无法找到页面")

我已经为网站启用了脚本,我也尝试过启用可执行文件.

这是完整的错误:

The page cannot be found
The page you are looking for might have been removed, had its name changed, or
is temporarily unavailable. 
------------------------------------------------------------------------------

Please try the following:

Make sure that the Web site address displayed in the address bar of your 
browser is spelled and formatted correctly. 
If you reached this page by clicking a link, contact the Web site 
administrator to alert them that the link is incorrectly formatted. 
Click the Back button to try another link. 
HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)

------------------------------------------------------------------------------

Technical Information (for support personnel)

Go to Microsoft Product Support Services and perform a title search for the 
words HTTP and 404. 
Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for 
topics titled Web Site Setup, Common Administrative Tasks, and About Custom 
Error Messages. 
Run Code Online (Sandbox Code Playgroud)

我可以在同一目录中找到Default.htm,所以我知道路径是正确的.我已经打开了它(暂时)所以我知道权限是正确的.

Joe*_*Joe 62

这可能是很多事情.我今天遇到这个问题,因为在安装IIS(aspnet_regiis -i -enable或等效的)之后,.NET还没有重新初始化.

  • 您还必须进入IIS管理器 - > Servername - >"Web服务扩展",并将ASP.NET v2.0xxxxxx设置为Allowed. (12认同)
  • 只需在aspnet_regiis命令的末尾添加`-enable`,从头开始将其加载为Allowed:`C:\ WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i -enable` (5认同)
  • @BIBD感谢我在故障排除II6中节省了3个小时的生命. (2认同)