为什么 Visual Studio 既说我的 solution/website 有 0 个错误,又说它确实有错误(然后浏览器发出 "Error 404.17")?
Why does Visual Studio say both that my solution/website has 0 Errors and that it does have errors (and then the browser coughs up a "Error 404.17")?
当我在 ASP.NET 项目中执行构建 > 重建解决方案和构建 > 重建网站时,它构建时出现 0 个错误。但是当我通过 F5 运行 它时,我得到,“存在构建错误。你想继续并且 运行 最后一次成功构建吗?”
I select "No" 并且错误列表仍然显示 0 个错误(11 个警告)。
所以 Visual Studio 似乎表明 solution/website 有 0 个错误,然后再次表明它确实有错误。它是否有 0 个编译时错误,但确实有构建时错误?如果是这样,我如何确定这些构建时错误是什么,以便我可以解决问题?
这是一个 Visual Studio 2010 VB 网站,使用 IIS6。
更新
当我右键单击解决方案并 select "View in Browser" 我得到:“错误 404.17 - 未找到
请求的内容似乎是脚本,不会由静态文件处理程序提供。"
更详细的异常转储是:
Server Error in Application "DEFAULT WEB SITE/CPSPORTAL"
Internet Information Services 7.5
Error Summary
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
Detailed Error Information
Module StaticFileModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x80070032
Requested URL http://localhost:80/CPSPortal/default.aspx
Physical Path C:\CSPortalCode\csportal\default.aspx
Logon Method Anonymous
Logon User Anonymous
Most likely causes:
The request matched a wildcard mime map. The request is mapped to the static file handler. If there were different pre-conditions, the request will map to a different handler.
Things you can try:
If you want to serve this content as a static file, add an explicit MIME map.
Links and More Information
Sometimes preconditions and a wildcard MIME map can unintentionally cause serving script source.
View more information »
那么这一切意味着什么呢?我怎样才能更恰当地将我的代码引入浏览器?
更新 2
我觉得这最 bizarre/macabre 和边缘反抗。以下是我尝试对 运行 网站进行各种操作时发生的情况:
Build > Rebuild Solution == 0 Errors
Build > Rebuild Website == 0 Errors
F5 or Shift+F5 == "There were build errors..."
Right-click the project in Solution Explorer and select "View in Browser" == the site runs in the browser showing me the Login page, active and responsive
ReSharper > Inspect > Code Issues in Solution == get 12,000 "issues" reported by R#
This MS support page正是我需要的照明。
按照它的建议,我转到 控制面板 > 管理工具 > IIS 管理器 > Connections.ApplicationPools > 默认应用程序池 > 高级设置... > 并更改了“常规”部分中的以下项目:
.NET Framework Version == v4.0 (was "No Managed Code")
Enabled 32-Bit Applications == True (was False)
现在网站终于 运行s...然而,根据 Resharper,它有 12,000 "code issues"(而且它甚至不是一个巨大的项目)。
更新
越来越好奇 - R# 说有 VB 个编译错误,它们看起来确实有效,但重建解决方案说有 0 个错误,并且站点在浏览器中确实 运行 ...?!?
当我在 ASP.NET 项目中执行构建 > 重建解决方案和构建 > 重建网站时,它构建时出现 0 个错误。但是当我通过 F5 运行 它时,我得到,“存在构建错误。你想继续并且 运行 最后一次成功构建吗?”
I select "No" 并且错误列表仍然显示 0 个错误(11 个警告)。
所以 Visual Studio 似乎表明 solution/website 有 0 个错误,然后再次表明它确实有错误。它是否有 0 个编译时错误,但确实有构建时错误?如果是这样,我如何确定这些构建时错误是什么,以便我可以解决问题?
这是一个 Visual Studio 2010 VB 网站,使用 IIS6。
更新
当我右键单击解决方案并 select "View in Browser" 我得到:“错误 404.17 - 未找到 请求的内容似乎是脚本,不会由静态文件处理程序提供。"
更详细的异常转储是:
Server Error in Application "DEFAULT WEB SITE/CPSPORTAL"
Internet Information Services 7.5
Error Summary
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
Detailed Error Information
Module StaticFileModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x80070032
Requested URL http://localhost:80/CPSPortal/default.aspx
Physical Path C:\CSPortalCode\csportal\default.aspx
Logon Method Anonymous
Logon User Anonymous
Most likely causes:
The request matched a wildcard mime map. The request is mapped to the static file handler. If there were different pre-conditions, the request will map to a different handler.
Things you can try:
If you want to serve this content as a static file, add an explicit MIME map.
Links and More Information
Sometimes preconditions and a wildcard MIME map can unintentionally cause serving script source.
View more information »
那么这一切意味着什么呢?我怎样才能更恰当地将我的代码引入浏览器?
更新 2
我觉得这最 bizarre/macabre 和边缘反抗。以下是我尝试对 运行 网站进行各种操作时发生的情况:
Build > Rebuild Solution == 0 Errors
Build > Rebuild Website == 0 Errors
F5 or Shift+F5 == "There were build errors..."
Right-click the project in Solution Explorer and select "View in Browser" == the site runs in the browser showing me the Login page, active and responsive
ReSharper > Inspect > Code Issues in Solution == get 12,000 "issues" reported by R#
This MS support page正是我需要的照明。
按照它的建议,我转到 控制面板 > 管理工具 > IIS 管理器 > Connections.ApplicationPools > 默认应用程序池 > 高级设置... > 并更改了“常规”部分中的以下项目:
.NET Framework Version == v4.0 (was "No Managed Code")
Enabled 32-Bit Applications == True (was False)
现在网站终于 运行s...然而,根据 Resharper,它有 12,000 "code issues"(而且它甚至不是一个巨大的项目)。
更新
越来越好奇 - R# 说有 VB 个编译错误,它们看起来确实有效,但重建解决方案说有 0 个错误,并且站点在浏览器中确实 运行 ...?!?