I've developped an application under ASP.NET MVC 3 (C# / Razor) framework and everything works fine so far. Yesterday, I've decided to install IIS 7 (7.5 I think?) on my developpement machine (Windows 7) to see if there was any issues that would come up when deploying to the actual server. Well there was a couple, 3 of which I cannot find an answer (and maybe there isn't an answer).
First problem (Maybe this one should be asked on Stack Overflow)
In Visual Studio 2010, when I head to the project properties into the "Web" section, I switched the "Servers" configuration to "Use Local IIS Web server" and unchecked the "Use IIS Express" config. However, whenever I click on Create Virtual Directory, I get an error about Visual Studio not able to configure the web for ASP.NET 4.0 and asking me to do it manually. It does, however, create the Virtual Directory and appears to be working to that point (but website doesnt load, which will bring me to my 2nd question). In Visual Studio, I also cannot run the website in Debug (or even Release) but that shouldn't be a problem since I only need to compile (and maybe restart the app pool / website).
Second problem
Following the above steps, I ended up with a 403.18 Forbidden error. (Sorry for not posting the error message but it wouldn't be of much use since it's in french... Damn Quebec 101 law forcing companies to buy everything in french) I have then tried to do a "Manual" (but configured with the Publish feature of Visual Studio) setup of the web application that would deploy the application directly in a web application root instead of a Virtual Directory. This solved the issue, but I still want to get it to work in the virtual directory.
Third problem - SOLVED
When running the application localy using http://localhost/
, it manages to use my Windows account without any prompt. When I access the application with my LAN IP (locally or remotely) or even my loopback IP (127.0.0.1), it will ask for the Login and Password. I believe that having ASP.NET Impersonate enabled would attempt to use the login account before trying to login but I am apparently wrong, unless there something I haven't done properly. Could anyone lighten me up on this one?
Thanks a lot,
Pluc
(Ps. I'm not sure what configuration file to post so if any information is lacking, please let me know exactly which file you need in the comment and I will edit my question to add the required information)
Solution for the third problem
It was simply a problem with the browser not detecting the IP as an intranet website. Add the IP to the trusted website or use a FQN (I used the computer name) and it works.