Quantcast
Channel: .NET – Aaron Johnson
Viewing all articles
Browse latest Browse all 10

ASP.NET: The resource cannot be found.

$
0
0

Spent some time today buried in IIS trying to figure out why an ASP.NET application would throw the following error message for every single page that existed in an application within a website:

Server Error in ‘/myapp’ 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: /myapp/default.aspx
—————————————————-
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

Googled for “resource cannot be found” and found this link on the third result page. In it Jarrett mentions that he solved the problem by reading this experts-exchange.com question which suggests setting up the application as a Virtual Directory in IIS instead of simply marking the folder in the website as an application, which of course solved the problem for me as well. Since a picture is worth a thousand words, here’s the difference between a Virtual Directory (which is an application in and of itself) and directory in IIS that has been marked as an application:

virtual_directory.gif

directory.gif

My suspicion is that the problem has to do with ASP.NET configuration inheritance settings with Virtual Directories not inheriting from parent directories like a folder marked as an application would, but there isn’t much to go on. Any Microsoft IIS experts out there want to talk about the difference between a Virtual Directory and a folder that has been marked as an application from a configuration standpoint?


Viewing all articles
Browse latest Browse all 10

Trending Articles