Stefan Szasz
Stefan Szasz

Reputation: 1256

ASP 4.0 IIS HTTP 404

I just installed .NET 4.0 on my Win 2003 Server running IIS. I didn't have any problems using ASP.NET 2.0 built websites, but now if I set the ASP.NET version to 4.0 and I deploy a website built using vs2010, I get HTTP 400 http://localhost/mysite/Default.aspx homepage. I have an.xml file in the same folder and browsing to that shows its content as it should, no HTTP 400 error. I checked .aspx extensions in IIS configuration/Mappings and the application extension for aspx is set to c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll with verbs set to 'All'. The same issue (http 400) appears for wcf service .svc extension. I can browse though to an .xml document in the same virtual directory. What might be going on?

Upvotes: 1

Views: 623

Answers (1)

Jaroslav Jandek
Jaroslav Jandek

Reputation: 9563

You may try setting the HTTP runtime's requestPathInvalidChars attribute (if there are any bad characters in your URL according to ASP.NET 4): <httpRuntime requestPathInvalidChars="" />

It could have considered the : as bad (are you sure the address was not localhost:port?).

Edit: httpRuntime Element (the new attribute is not listed, yet, but it shows where you should put it in the web.config).

Upvotes: 1

Related Questions