woensdag, december 07, 2005

ASP.net error: "The resource cannot be found" because of a stupid "/" in IIS configuration (home directory, local path ) !

When I was testing a Web Setup project I always get a strange error (after the installation):


Server Error in '/TEST' 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: /TEST/Index.aspx
-------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032



The /TEST/Index.aspx file exist in the right path on my hard disk, so I went on searching and I found out that there were several people which had the same error-problem!

I find the solution (link) :

Under the root path in IIS configuration, under "Home Directory"
under the field "local path". "c:\inetpub\mywebsite\" is not the same
as "c:\inetpub\mywebsite" apparently now. My site came back alive as
soon as I removed the trailing backslash so that the path now says
"c:\inetpub\mywebsite"!

So you see that a stupid backslash can do harm!

6 opmerkingen:

Anoniem zei

Aaarrrggh!!!

Just removing one backslash! I spent 3 hours debugging, reconfiguring IIS and re-installing ASP .Net! Thanks for posting this up. Can finally get my work done now

Anoniem zei

Aaarrrggh!!!

Just removing one backslash! I spent 3 hours debugging, reconfiguring IIS and re-installing ASP .Net! Thanks for posting this up. Can finally get my work done now

Anoniem zei

good EFFFFFF-ing LORD.....

I spent abt 2 hours trying to figure this out.....

WTF..~~!! #$%#@Q$#%$#$%

Anoniem zei

Forgot to say thank you =)

Anoniem zei

Wow, glad you posted this solution. You just saved me a *ton* of time.

Thanks!

Anoniem zei

omg it's 1pm and i've been trying to fix this problem since i got to work at 8:45am!

so stupid. thanks for help