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")?

0

When I do a Build > Rebuild Solution and Build > Rebuild Website in a ASP.NET project, it builds with 0 Errors. But when I run it via F5, I get, "There were build errors. Would you like to continue and run the last successful build?"

I select "No" and the Error List still shows 0 Errors (11 Warnings).

So Visual Studio seems to be indicating that the solution/website has 0 Errors and then again that it does have errors. Is it the case that it has 0 compile-time errors, but it does have build-time errors? If so, how can I determine what those build-time errors are, so that I can fix the problem?

This is a Visual Studio 2010 VB website, using IIS6.

UPDATE

When I right-click the solution and select "View in Browser" I get: "Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler."

A more detailed exception dump is:

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 ยป

So what in tarnation does all that signify? How can I more appropriately introduce my code to the browser?

UPDATE 2

I find this most bizarre/macabre, and borderline revolting. Here's what happens when I try various things to run the website:

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#
asp.net
visual-studio-2010
iis-6
compile-time
build-time
asked on Stack Overflow Mar 25, 2016 by B. Clay Shannon • edited Mar 25, 2016 by B. Clay Shannon

1 Answer

0

This MS support page was just the illumination I needed.

Following its advice, I went to Control Panel > Administrative Tools > IIS Manager > Connections.ApplicationPools > Default App Pool > Advanced Settings... > and changed the following items in the "General" section:

.NET Framework Version == v4.0 (was "No Managed Code")
Enabled 32-Bit Applications == True (was False)

Now the site finally runs...yet, according to Resharper, it has 12,000 "code issues" (and it's not even that gigantic of a project).

UPDATE

Curiouser and curiouser - R# says there are VB compile errors, and they do seem valid, yet rebuilding the solution says there are 0 Errors, and the site does run in the browser...?!?

answered on Stack Overflow Mar 25, 2016 by B. Clay Shannon • edited May 4, 2016 by B. Clay Shannon

User contributions licensed under CC BY-SA 3.0