Peter's Gekko

Sponsors

The Lounge

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Switching from the VS development server to IIS

By default a web project in VS is hosted by Cassini, the included web-server. Nevertheless I prefer IIS for my projects. For several reasons:

  • Security. A site running in IIS is running under the asp.net account which is quite a stricter security context than the one Cassini is running in. This can lead to some unpleasant surprises when the app is taken to production. The issues would have popped up earlier when the app had been developed using IIS.
  • Clearness of URL's. Especially when developing web services their consumers need clear url's . Using Cassini every service uses another port, by default this is random. In such a scenario it will be a puzzle to find out the url's of the services in a new round, or a round on another development machine. You can assign fixed ports to an app, but I don't think that's very clear.
  • Security. When consuming a web service with a mobile app, or even from the emulator, you are crossing a network border. By default the firewall of your machine blocks the incoming request. Opening port 80 for "normal" web requests is doable, opening all the different ports Cassini is using will end in a nightmare.

Switching from Cassini to IIS is no big deal, there is a web property page in a web project. Switching smooth required a little more attention.

  • Check "USE IIS Web server"
  • Click "Create Virtual Directory"
  • Click save. Now the somewhat enigmatic dialog shown in the screenshot pops up
  • In the solution explorer refresh the web project

After the last two steps the new (service-consumer) projects will have the right url. In case you skip them they will use the old Cassini-type url.

This is no big deal but I would like to have IIS as a default. Without a doubt there is a setting for that but I just can't find it. Anyone?


Posted 09-12-2006 2:57 AM by pvanooijen
Filed under: ,

[Advertisement]

Comments

Richard’s » Blog Archive » VS 2005 project on the old IIS wrote Richard’s » Blog Archive » VS 2005 project on the old IIS
on 09-18-2006 12:52 PM
Levi Wallach wrote re: Switching from the VS development server to IIS
on 02-05-2007 1:26 PM

Thanks, unfortunately, my properties page does not have an option for IIS even though I have it on my system.  Any ideas?

pvanooijen wrote re: Switching from the VS development server to IIS
on 02-06-2007 2:07 AM

The tab WEB is only there in a web project.

grietman wrote re: Switching from the VS development server to IIS
on 04-18-2007 8:19 AM

It affects the way you debug (you must attch your app to IIS) and it can be problematic when working with different people on the same project. Some people like to debug in cassini, others like to work in IIS.

http://30649.aspx.codebetter.com/blogs/peter.van.ooijen/archive/2006/09/12/Switching-from-the-VS-development-server-to-IIS.aspx wrote http://30649.aspx.codebetter.com/blogs/peter.van.ooijen/archive/2006/09/12/Switching-from-the-VS-development-server-to-IIS.aspx
on 03-26-2008 4:53 AM
http://loopback.codebetter.com/blogs/peter.van.ooijen/archive/2006/09/12/Switching-from-the-VS-development-server-to-IIS.aspx wrote http://loopback.codebetter.com/blogs/peter.van.ooijen/archive/2006/09/12/Switching-from-the-VS-development-server-to-IIS.aspx
on 03-27-2008 5:25 AM
http://monkeys.codebetter.com/blogs/peter.van.ooijen/archive/2006/09/12/Switching-from-the-VS-development-server-to-IIS.aspx wrote http://monkeys.codebetter.com/blogs/peter.van.ooijen/archive/2006/09/12/Switching-from-the-VS-development-server-to-IIS.aspx
on 03-28-2008 5:56 AM
Ronny wrote re: Switching from the VS development server to IIS
on 06-11-2008 5:20 PM

My WEB Project doesn't show a web tab. Even doesn't show any tab, the context menu has an item labeled "Property Pages"  and the window showed is not the same you posted.... I'd like to debug in IIS but always is showed the ASP.Net Development Server.... the project is named something like "C:\..\myproyect" instead of "localhost/myproject"

Any Ideas?

Sheryar Nizar wrote re: Switching from the VS development server to IIS
on 02-10-2009 4:25 AM

Check the installation of Visual Studio if its professional edition or some other.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?