tags:

views:

251

answers:

1

Literally it is a blank page with just "Bad Request" in the upper left corner, nothing else. I'm trying to run an ASP.Net website locally for development purposes. The following is what I've done to get to this sorry state: IIS is installed and activated (obviously) and I've turned on all the windows features under

Internet Information Services -> World Wide Web Services -> Application Development Features

as well as under

Internet Information Services -> World Wide Web Services -> Common Http Features

I've also edited the hosts file to contain: 127.0.0.1 dev.myproject.com 127.0.0.2 dev.myproject.com

Frankly I have no idea why 127.0.0.2 is mapped, when my boss showed me the process he added it so I've done the same here. I'm pretty sure it'll work with just 127.0.0.1 so as a side note if anyone wants to enlighten me as to why you'd want to map 127.0.0.2 as well I'd be delighted.

Past this, because this is iis7 but we use ii6 url rewriting I've followed this article's steps: http://www.improve.dk/blog/2006/12/11/making-url-rewriting-on-iis7-work-like-iis6

Long story short (the article) under handler mappings the static file handler is set to match *.* and is only invoked on files and I've got a Wildcard handler that is set to match * and has no mapping request restrictions with the executable %windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll. Also, the Wildcard handler is the last handler to be invoked. The website is running under the Classic .NET App Pool and since this machine is a 64 bit machine but its a 32-bit project I've set Enable 32-Bit Applications to true for the Classic .Net App Pool.

Now up until the final step of this process (enabling the 32-bit applications) I was getting very pretty and normal iis7 errors. The ones where you get detailed error info and it tells you the likely causes and possible fixes. So iis itself is most definitely functional. Beyond this, if I request a specific page, like dev.myproject.com/default.aspx it will be properly served. But if I try dev.myproject.com/ then I get that "Bad Request" page. So I'm thinking its got to be a url rewriting issue.

Adding to the intrigue, I've gone through this process and actually have this project working on my own computer (trying to set it up on a coworkers currently) and I cannot find any differences between my setup and my coworker's. Obviously there is a difference, I just for the life of me cannot find/figure it out.

So anyway, I throw myself upon your collective mercy and give thanks in advance.

A: 

By default IIS 7 is locked down.

It may be that you are trying to run a aspx page and aspx is not set to allowed.

Based on your comment below, it looks like you have a problem with the definition of your default document.

You could also check your IIS log to check what is returning the bad request.

Shiraz Bhaiji
How would I tell if this is the case? Also, like I said I -can- run an aspx page as long as I give the exact link, ie: dev.myproject.com/default.aspx rather than dev.myproject.com/
Trajanus
Well, I accidentally stumbled on a 'solution'. I switched the staticfile handler back to its default (so it maps to * and the mapping request restrictions are file or folder) and its working now. I'm not going to mark this answered yet though, since I don't understand why it works. I don't think its the default document since the project has a default.aspx in its root and that is on the default document list. I'll get back to this on monday and check the log. I appreciate the help Shiraz.
Trajanus
Trying to get to the default page I get the following in the log:2009-09-23 20:07:42 127.0.0.1 GET / - 80 - 127.0.0.1 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-US;+rv:1.9.1.3)+Gecko/20090824+Firefox/3.5.3+(.NET+CLR+3.5.30729) 400 0 0 63So it might seem like a default document problem, but I get something identical when trying to visit another part of the site:2009-09-23 20:18:24 127.0.0.1 GET /Video-Page/View-535 - 80 - 127.0.0.1 Mozilla/5.0+(Windows;+U;+Windows+NT+6.0;+en-US;+rv:1.9.1.3)+Gecko/20090824+Firefox/3.5.3+(.NET+CLR+3.5.30729) 400 0 0 0Any more ideas?
Trajanus