Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts
Friday, 19 December 2008
Localhost on IIS7
By default, browsing to localhost on IIS7 brings up a welcome screen. To associate localhost with a particular web site, right-click the web site in IIS7 and select "Edit Bindings" (or just "Bindings", depending on which pane you were in when you right-clicked; IIS is still as inconsistent as ever!). In the "Add Site Binding" dialogue box, add localhost as a host name. Apply the changes. You will now be able to browse to localhost.
Labels:
IIS
Tuesday, 8 July 2008
Creation of the virtual directory http://localhost/ failed
On attempting to check out a project in VS2008, I got the following message:
The local IIS URL http://localhost/ specified for Web project DemoWebsite has not been configured. In order to open this project the virtual directory needs to be configured. Would you like to create the virtual directory now?
On clicking yes, I got the following error:
Creation of the virtual directory http://localhost/ failed with the error: The URL 'http://localhost/' is already mapped to a different folder location.
The rest of the solution checked out all right, but the above project did not; it was marked as unavailable. I right-clicked the project node in the solution explorer and selected the option to edit the project (.csproj) file. Near the bottom of the file, I found the following:
<iisurl>http://localhost/</iisurl>
I edited this entry to add a virtual directory:
<iisurl>http://localhost/myapp</iisurl>
Having saved the change, I then right-clicked the project node in the solution explorer again and reloaded the project. When I was prompted to create the virtual directory again, the creation was successful and the project checked out. The virtual directory is created under the running web site in IIS (on Windows XP).
The local IIS URL http://localhost/ specified for Web project DemoWebsite has not been configured. In order to open this project the virtual directory needs to be configured. Would you like to create the virtual directory now?
On clicking yes, I got the following error:
Creation of the virtual directory http://localhost/ failed with the error: The URL 'http://localhost/' is already mapped to a different folder location.
The rest of the solution checked out all right, but the above project did not; it was marked as unavailable. I right-clicked the project node in the solution explorer and selected the option to edit the project (.csproj) file. Near the bottom of the file, I found the following:
<iisurl>http://localhost/</iisurl>
I edited this entry to add a virtual directory:
<iisurl>http://localhost/myapp</iisurl>
Having saved the change, I then right-clicked the project node in the solution explorer again and reloaded the project. When I was prompted to create the virtual directory again, the creation was successful and the project checked out. The virtual directory is created under the running web site in IIS (on Windows XP).
Labels:
ASP.NET,
IIS,
Troubleshooting,
Visual Studio
Sunday, 1 July 2007
Do Not Use Underscores in Host Names
As part of a recent development task, I’d written some code to log users in to an extranet. It worked fine in Firefox, but when used in IE, it kept redirecting users back to the login screen. Debugging showed that users were being successfully authenticated, but that this was being lost as soon as the user tried to navigate to another page. After a long and painful process and the enlisting of help from colleagues, the problem was traced to an underscore in the host name (ie. the hosts file had an entry similar to “127.0.0.1 my_site.com”). Is was only half chance that the culprit was discovered—we tried to add a host header in IIS and it complained about invalid characters.
It took about three days of project time and much hair-pulling to pin down this obscure issue. One to note!
It took about three days of project time and much hair-pulling to pin down this obscure issue. One to note!
Labels:
ASP.NET,
authentication,
IE,
IIS,
Troubleshooting
Subscribe to:
Posts (Atom)