次の方法で共有


Unable to build any application in a VS 2005 Application

Here is an interesting issue which I found today. One of my customers was working with VS 2005 and found that he was unable to build any application at all! Even a newly created Application with a single page failed! The error message didn't lead me anywhere since it didn't have any description.

In the error list here is all that came up...

Error 1

...and it looked like this in VS 2005

The fix was pretty simple, and so was troubleshooting! I found that not even a simple aspx page (in TestWeb Virtual directory) was not browsable from the IIS. Here is the error message which came up when we tried to browse Default.aspx page.

Server Error in '/TestWeb' Application.
--------------------------------------------------------------------------------
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /TestWeb/Default.aspx
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

Looking that the WebSite's "Home Directory" tab, we found the local path to be "F:\" and the trailing backslash was giving us that issue, because the Virtual folder's Local Path was "\Testweb" and eventually the whole path became "F:\\TestWeb". As can be seen, the double backslash was causing the whole issue, since that made the path meaningless.

To fix it, all you have to do is to create another folder like "F:\WebSiteFolder" without a trailing backslash, and cut-paste the TestWeb folder from the F:\ root, to the folder F:\WebSiteFolder. This is because, you can't remove the backslash from "F:\" from Local path. If you try giving "F:" in the Local path under Home Directory, you will get an error message saying "The path is not a fully qualified local path."

Hope that helps!
Rahul

ErrorList.JPG