CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Peter's Gekko

public Blog MyNotepad : Imho { }

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?


Published Sep 12 2006, 02:57 AM by pvanooijen
Filed under: ,

Comments

Levi Wallach said:

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

# February 5, 2007 1:26 PM

pvanooijen said:

The tab WEB is only there in a web project.

# February 6, 2007 2:07 AM

grietman said:

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.

# April 18, 2007 8:19 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add
Check out Devlicio.us!