| ||
|
This community works best when people use their real names. Please
register for a free account.
Other Groups: Joel on Software Business of Software Design of Software (CLOSED) .NET Questions (CLOSED) TechInterview.org CityDesk FogBugz Fog Creek Copilot The Old Forum Your hosts: Albert D. Kallal Li-Fan Chen Stephen Jones |
I just discovered, to my anger, that in XP Pro you cannot have more than one web site in IIS. WHY THE F*CK NOT??? Here I am, working on at least 3 different large web projects at the moment, all with different configs, global.asa, etc. and I just want to have three web sites on my local machine for development. Looks like there is a sort-of workaround to this, you can use the adsutil.vbs script to create another site, but only one can be started at a time. And from what I can see on Google, there was an ISAPI filter that let you mimic multiple sites in IIS, but it is not there anymore. Mentioned here http://codeproject.com/w2k/xpwebdevfriendly.asp, and supposedly used to be at http://www.hairy-spider.com/multisite.aspx. Anyone know if that has a new home now? Thanks. Thanks a lot Microsoft, for making my work a little harder to do. Anyone know of any other ways around this? In the past we have had a dev server where each developer could have web sites configured, but I read that for VS.NET they recommend the local (what they call isolated) development paradigm because that is the only way that debugging works in a multi-developer setting. If you have a "semi-isolated" environment (multiple sites on a common development server), the issue is that "only one developer can debug the application on the Web server at any one time. This is because when you debug an application, IIS is blocked." (quoting from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/tdlg_ch2.asp). So I just don't get how they can recommend developing on your own machine but then hobble IIS so badly there. Am I missing an easy way around this problem?
I've run Windows Server 2003 as my primary development OS for about a year now. I much prefer it to XP, it's a lot less demanding on system requirements, and you can configure it to look/act mostly like XP without much hassle. The only problems I have had with it is: - Some software just doesn't support "servers". I'm talking about a few firewalls and virus scanners mostly, though if you buy "pro" editions they are usually ok. - Most games just don't work either. It's also very easy to setup IIS (6.0) and comes preinstalled with the .NET Framework 1.1 and 1.0.
AMS, I would recommend against using Server editions of Windows if you don't have server edition of Anti-virus protection and workstation firewalls (and it's part of your regular IT policy to run both on all stations). However if you do have such firewalls and AV protection in place, go hog wild. That's what the MSDN is for.
If your machine is just a dev machine, just put Windows 2003 on it - it definitely is much easier. Note that if we're talking about a laptop this may be problematic, since as usual the hardware guys are saying "it's a server, it doesn't need laptop drivers". (The big problem we've seen is in video drivers for things like dual display) At 768MB, running Win2k3 in a VPC is iffy - I work on a 1GB machine with 512MB for the VPC, and I'd call that a bare minimum. Hope this all helps. :/ Philo
Sorry, but what's the issue here? Is it the need to use more than one domain name on your local machine? If you need to use absolute URLS and you're using asp.net here's a workaround that works for me: 1.) Edit the web.config <configuration> <appSettings> <add key = "AutoURL" value= "http://www.mydomain.com"/> </appSettings> ... </configuration> 2.) in your server side code you can read that key by: MyDomain = ConfigurationSettings.AppSettings("AutoURL")
OneFlew Saturday, February 05, 2005
Unless you work on more then one, create three directories. C:\inetpub1\wwwroot C:\inetpub2\wwwroot C:\inetpub3\wwwroor Then, point the root directory of your one site to one of the three above. Run iisreset to be safe, and move on. I understand your "need", but if you can really work on two or more at the same time, you need to stop drinking so much Coffee... Zumbas
It's easy enough to have IIS in XP Pro support multiple web sites. You can have multiple sites configured, but only one running at a time. To configure this, go to c:\inetpub\adminscripts\ Run: cscript adsutil.vbs copy W3SVC/1 W3SVC/2 Open the IIS admin tool, and you'll see two copies of "default web site". Stop the first one, edit the settings of the second one (point it to a different directory, rename it, or whatnot) and start it. You might have to restart IIS in the process. Works very well for me. Every time I switch web projects, I have to stop one site and start another, but this is a reasonable enough price to pay for using this OS.
This (free) app works well for creating and switching between multiple websites on Windows XP Pro: http://www.firstserved.net/services/iisadmin.php It's a heck of a lot easier than manipulating scripts every time you want to add a new website. It's also infinitely cheaper than running Server 2003 or 2000 (unless you have an MSDN subscription or something already). VMWare/VPC are good alternatives if you've got the hardware to handle the memory/load, but you still need the OS licenses. We already had everyones dev environment set up, so the thought of re-installing and acclimating them to new os'es was prohibitive. I wrote an app similar to IISAdmin that we use internally. IISAdmin is kind of flaky on Win2KPro which is what our other developers are running. It wasn't too much work to implement using ADSI. If you want to make modifications to IISAdmin and don't want to implement something from scratch, I believe they'll even let you have the source code (their web site seems to indicate this). -=Aaron=-
Aaron Flynt Sunday, February 06, 2005
Um, yeah... I'm not sure I get it. I've got at least 5 different development web sites going at all times, and I'm using XP Pro. You can set up as many virtual directories as you want. Each will be its own web application, as far as application and session state are concerned. You don't get each site as the root of a domain, is the only difference. http://mypc/mydevsite1 http://mypc/mydevsite2 http://mypc/mydevsite3 ...
It's common practice to reference images/css/javascript files relative to the root of the site (/images/image.gif, /css/style.css, etc...) for use in include files. This is something that a lot of web/html guys do to speed up the build out process of static, content driven web sites. You can't do this if all of your dev sites are one directory down the hierarchy (unless you deploy one directory down). Code based workarounds like 'siteroot' global variables (<%= siteroot %>images/image.gif) aren't practical for non-programmers, are inelegant when you're trying to separate html from back end code, and require additional deployment/integration work. Using paths relative to the source file adds more work to the build out process since you either have to abandon the use of includes or have separate includes for each tier in the directory hierarchy. For a few web applications built and maintained solely by programmers, I agree that this is mostly a non issue. When you are moving from a shared server to a local development process, and you've got scores of sites built out this way, this becomes a big PITA. -=Aaron=-
Aaron Flynt Sunday, February 06, 2005
My experience is the same as Paul's... been running W2K3 server as my primary dev OS since it came out. And, actually, every game I've tried worked (Doom 3, Half-Life 2, Dark Age of Camelot, World of Warcraft)... just needed to make sure you use the manufacturer video driver instead of the Microsoft sanctioned 'safe server" driver. Also, make sure you have hardware acceleration enabled, as well as DirectX acceleration. Only takes about 30 seconds to make the changes.
Regarding referencing include files, images, JS, CSS, etc for a virtual directory: If you're using .aspx pages in ASP.NET, then you can also use the "~" (tilde) relative path to refer to other folders and files in the virtual directory tree. Note that this is different from the "/path" relative path. The tilde is a shortcut for the AppDomainAppVirtualPath Property, which "gets the virtual path of the directory that contains the application hosted in the current application domain." Note that I don't believe this will work for static HTML pages, only for .aspx pages. "~/path" is relative to the root of the virtual directory (or web site if it's a top-level web site) "/path" is relative only to the root of the web server (website) and won't work correctly when using a virtual directory For more information, see either of the following articles: http://www.aspnetpro.com/newsletterarticle/2003/11/asp200311kd_l/asp200311kd_l.asp (about two-thirds down the page) http://authors.aspalliance.com/remas/ASP.NET/GreatFeatures/Tilde/ As mentioned by Ian Olsen, you can certainly have more than one virtual directory in IIS on Windows XP Professional.
Not all the projects are ASP.NET, and yes they have a lot of root-relative links for images, include files, and some of the navigation. So putting them in subdirectories of a single web site could be done, but would take a lot of refactoring that is not really necessary for the deployment target. and would make it impractical for all but very low traffic sites). We'll probably use the admin scripts to create the sites and then just keep the IIS service manager handy to turn them off and on as needed. May not be as bad as my first reaction was (though still annoying, regardless). | |
Powered by FogBugz
