views:

37

answers:

1

Hi all,

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?

+1  A: 

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).

Jaroslav Jandek
Forgot to mention it, it was indeed localhost:port (81). I created a new Website and in this new website I created my virtual directory I mentioned before.
Sese
Jaroslav Jandek