I am busy working with an ASP.NET MVC 3 application and using Windows 7. Currently it uses the built in web server to run the web application. I would like it to run in IIS. Is there any advice that I need to know about when setting this up to run on IIS?
A guy from work said that my web application MUST be in the wwwroot directory for IIS to work properly. My understanding of this is that if I created a virtual directory (web application can then be in any directory) then I should be ok?
Also, are there decent books that I can purchase that can help me in understanding IIS better? This does not have to be specific to ASP.NET MVC. The only thing that I know how to do in IIS is to create a virtual directory :)
How would I then debug the application when it is running in IIS?
Any advice and internet articles would be appreciated :)
You can use VS.NET do to the work for you. In your project's properties page, switch to the "Web" tab and slect "Use Local IIS Web Server". Provide the url you desire and VS. will do the rest.
To answer your question specifically, no your site doesn't have to be a sub folder of IIS's root folder for this to work and debugging will work as normal.
FYI: I don't ever use the Development web server and have always used IIS. Most of my project are sub folders of IIS's root folder and I manually edit the .proj file to point it to the right place. But this is not required for things to work.
With Internet Information Services Manager you should be able to do a lot more than create virtual folders. Things are quite a bit simpler.
However, as regards IIS and ASP.NET in general. I'd suggest you read up on App Pools and their process model (the various options under ProcessModel as well as other sections).
MSDN and http://www.iis.net/ are generally good places to get decent information on all things IIS.
Edit: As an aside, you may also want to look at the recently introduced IIS Express. It actually replaces the development server and is really IIS 7 for all intents and purposes so all of IIS 7's functionality is available. Plus you don't need to run your VS as administrator if for some reason you're not able to.
If you are able to run VS.NET as administrator on your machine I'd suggest using IIS 7.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With