ASP.NET Development Server or Localhost IIS?
Solution 1
There is nothing that the ASP.NET Dev WebService can do that IIS can't (You can set breakpoints etc, just attach the VS debugger to the ASP.NET runtime).
However, the ASP.NET Dev WebService does not represent a true production environment, and as such you can get caught by gotchas that you wouldn't expect when you deploy to production.
Because of that, I mandate that all development is done using IIS on a local machine. It doesn't take much work to configure a site in IIS.
Solution 2
It's a very good idea. Here are some reasons for:
- You no longer need admin access to your machine for web development (it can still be helpful).
- It's much easier to test a quick change and continue work, and faster iteration cycles are good.
- It can simplify setup and deployment of your development environments.
- The XP version of IIS has limitation that are not present in the Server version that Cassini side-steps.
The only argument I know against is that there are a couple very rare edge cases where the Cassini built-in server doesn't exactly mimic IIS because you're using odd port numbers. I doubt you'll ever run into them, and using Cassini as the primary dev environment does not preclude developers from also having access to IIS on the machine. In fact, my preferred setup is Cassini first for most small work, then deploy to my local IIS for more in-depth testing before moving code back to the shared source repository.
[Edit]
Forgot about url re-writing. You do need IIS for that. And an example of a limitation of the built-in XP IIS is that you are limited to one site in XP (can have multiple applications, but that's a different thing).
Solution 3
I had to switch (back) to IIS for one project, because I needed to set some virtual directories which is not possible on the ASP.NET Development Web Server.
Solution 4
As I stated here: https://stackoverflow.com/questions/103785/what-are-the-disadvantages-of-using-cassini-instead-of-iis your developers need to be aware that Cassini runs as the local user, which is typically an admin account for developers. The development will be able to access any file or resource that their account can, which is quite different from what they will see on an IIS 6 server.
The other thing that's a pretty big gotcha is debugging web services is much easier using IIS and vdirs rather than separate Cassini instances.
Solution 5
I know at one point I had an issue with Authentication not working as expected on Cassini (built in development server)
Also, if you need to test things like ISAPI plugins (a re-writer for example) I'm not sure how that's done on Cassini.
The constantly changing port is also rather disconcerting to me. Also, for each web project in your solution it fires up another instance of a Casini server, and each one takes anywhere from 20 to 50 MB of memory.
I use IIS all the time, it's pretty easy to setup, and you guys are already doing that...
Related videos on Youtube
amiry jd
Updated on July 09, 2022Comments
-
amiry jd almost 2 years
Basically I know what the difference is. Also, I do know (as you all) there is a lot of resources discussing the issue (e.g. here).
But today, I heard an strange and weird idea which says
Add
method, adds the object to application-scope cache, while theInsert
method will adds the object to the session-scope cache!!!I mean
HttpContext.Current.Cache.Add
will add object to a shared memory which is accessible for all users/threads/sessions/requests/etc. ButHttpContext.Current.Cache.Insert
will add the object to a session-dependent cache (which actually would be the session itself. right? :D)!!!It's the first time I'm hearing such a thing. I did search the msdn and technet.microsoft.com. I also did decompile the
Cache
class (via dear ReSharper) and read the entire code (and it's dependencies). But nothing came out which make a dependency between Cache and Session.I'm just asking. Is there any relationship between Cache and Session?
Note: The app is running on a web garden in a Win 2012 R2 machine with IIS 8.5.
-
Darko almost 15 yearsCassini was the old name when it was still in development. Cassini is to ASP.NET Development server what Atlas is to MS ASP.NET AJAX
-
Bibhu over 9 yearsI am leaving this link over here so that it may be helpful for anybody in future, as it outlines the differences - asp.net/web-forms/tutorials/deployment/…
-
-
perimosocordiae over 15 yearsAgreed. I've hit several gotcha's with running a project that way. You should always use local IIS.
-
Peter Ramos over 15 yearsCassini pipes every request to the ASP.NET runtime, IIS doesn't. Cassini cannot use ISAPI...IIS does. You can configure Visual Studio to launch your localhost on IIS when launching the app, and it will startup faster than loading cassini.
-
rp. over 15 yearsI'm with Joel on this one. Unless I bump into something that Cassini flat can't do (URL rewriting) I don't have any trouble with Cassini and find it very handy.
-
rp. over 15 yearsIt's interesting that an answer like this gets voted down. I think the opinion presented has merit--but even if I did disagree with it voting it down isn't the way do that.
-
Nick over 15 yearsThanks, will take a look, it'll save having to add code to deal with the VDirs.
-
Nick over 15 yearsAgree re. port numbers. We currently generate an RSS feed for links to our dev websites, don't think I'll be able to make it work with Cassini
-
Andrew Shooner over 15 yearsOn the "Web" tab of your web projects properties screen, you can specify a static port. For Web Site projects, this is in the standard property window.
-
missaghi over 15 yearsdo you need admin to run iis?
-
Joel Coehoorn over 15 yearsJust to run it, no. To use it for development, where you may need to adjust settings or add a virtual directory now and then, yes.
-
Darko almost 15 years+1 absolutely, local IIS is the best for avoiding (and picking up before release) any problems
-
Darko almost 15 yearswhy is needing admin a problem? I have never ever worked for a company that didn't give me admin access nor would I... Also changes get picked up on IIS just as fast. Also how does a dev server simplify deployment? What odes the server have to do with deployment? Agreed on last point - non server IIS is always gimped in some way.
-
Jaap almost 15 yearslocal IIS doesn't give you the advantage of edit & continue. It would be ideal to have IIS7 as a replacement for the old Cassini
-
Tim Trout almost 14 yearsComing soon (or may be available by the time you read this) is IIS Express, bringing IIS 7.5 to non-admin users and allowing developers to use IIS 7.x features even when the host OS is XP. See weblogs.asp.net/scottgu/archive/2010/06/28/…
-
Stefan Steiger almost 12 years-1 ! I'd give you -100 if only I could. Why do people upvote this ? It can only be the lack of better judgement. Developing elsewhere is always bad. And THIS is an especially very very bad idea. And not having admin access for a developer is a very bad idea, too. The differences between development server (classic mode default) and IIS 7 (integrated mode default) are staggering. If you do development on the ASP.NET development server, you will get screwed in no time at all, especially when using AJAX or impersonation or external shell processes. Or SSL. Or Virtual Directories, etc. etc. etc.
-
Joel Coehoorn almost 12 years@Quandary note that when I first wrote this, neither Windows 7 or IIS 7 were out yet. Cassini solved some real problems for developers with the Windows XP version of IIS.
-
Andrew Barber over 11 yearsI've never noticed any such delays. There must be something wrong with your installation or your browser settings. (I remember something strange happening with Firefox and using either
localhost
or127.0.0.1
, but I don't remember what it was and what fixed it) -
Sam almost 11 years-1 because you said There is nothing that the ASP.NET Dev WebService can do that IIS can't. I don't think you're correct. (See @Jaap's comment.)
-
AaronLS over 10 yearsProbably a happy compromise is to use checkin builds deploy to IIS test server. So while developing you use developement server locally, but after checking in do final integration testing on the IIS test server.
-
ChrisBint over 9 yearsI would agree that I cannot find any reference to that being the case.