Coolbits Tips

.NET and general software development tips and articles I've written.

Go Back

Web Setup Projects Can Install to Root Folder

One of the things I always struggle with are how to handle installations for web applications. I like using the web setup project template available in VS.NET, and for simple things I've had some success. But one thing that frustrated me was that during the installation process, it always asked the user to indicate the virtual directory I want to install to. That's great, but what if I want to install into the root folder of my website?

No problem, because all you need to do is remove the text in the textbox. You are allowed to have the virtual directory name to be blank, which will automatically put your installation in the root folder for the website. Here are few other facts:

  • If you have multiple websites defined on your webserver, the install will not prompt you to select the website - it just selects one for you. If you stop all but the correct site, it will install into the running site, so I use this trick to get my installation into the correct website.
  • If you like to define a different location for your website or virtual directory, I recommend that you create the site or virtual directory first, pointing it to the desired physical location. During installation, your files will then be located in the correct place.

Comments  13

  • Klabauter 05 Feb

    Hi Ho!

     

    I must install my web project in a specified website on IIS.

    I've tried this and has stoppt all my websites but the one in which I want to install my web project in IIS.

    Even so the setup installs it in the first site that is found, whatever it is stopped or not.

    What the hell is wrong?

    It is a Win2000 Server with IIS 5

  • alovhaug 05 Feb

    Interesting - this has worked for me that last several times I tried it.

    I've used this with a Windows 2000 Standard Server and IIS 5, as you mentioned, so that isn't it.

    Are you installing to the root, or a precreated virtual directory?

    It has worked for me in both cases - I'm just trying to isolate the issue.

    How are you stopping IIS? I was just doing it from the Internet Information Services Manager.

    --Avonelle

     

     

  • alovhaug 05 Feb

    Are you using Visual Studio .NET 2002 or 2003? I wonder if that makes a difference. I'm using 2003. I don't recall if I used this with the earlier version of VS .NET or not.

    --Avonelle

     

  • Klabauter 05 Feb

    Hi, thanx

     

    I'm using VS.NET 2003 for Development.

    On the target server I have installed the Framework 1.1, Win2000 SP4

    I have triet to install it to the root, precreated and not precreated virtual directory.

    The other websites I have stoppt by using the system management console / Internet Informationservices.

    On each website there are two items in Right-Clickmenu. I don't know how they are called in an english Windows-version. In german it is "Anhalten" and "Beenden" - may be, its called "pause" and "stop" in english. I have tried both.

     

  • alovhaug 05 Feb

    Well, this is certainly odd. That is exactly what I do - and it works for me! I usually use "Stop" and not "pause", but since you tried both, there's no relief there.

    Are you saying that you are using a non-English version of Windows? I wonder if that is the difference. If so, that would be really bad!

    How are the multiple websites distinguished by users accessing the sites? I mean, are they each tied to a different port, or are you using host headers, or something else?

    --Avonelle

     

     

  • Klabauter 05 Feb

    Uh... that is difficult for me to answer. 

     

    In my TCP/IP Configuration are three different IPs.

    No settings for DNS Server.

    each IP points to one website. No Hostheaders.

     

     

  • alovhaug 05 Feb

    Oh sure - take the obvious approach!

    Well, I'm running out of ideas. About the only thing I can think of is that it has to do with a non-English version of Windows, if that is what you are using.

    I have a virtual machine set-up where I was using this approach - if I get a chance later today I'll run through it again in case there is something I missed that I just am not remembering now. If I learn anything new, I'll let you know. And if you learn anything new, please post it here - I certainly want to make sure I'm providing accurate information on coolbits.

    Thanks!

    -Avonelle

     

  • Klabauter 06 Feb

    Ok, I will see.

    thanx a lot for help  

  • Klabauter 06 Feb

    OK. I don't exactly know why this is necessary.

    If I change the IP-Setting of EACH website on IIS to nothing (all IPs), it works like it is described on Top.

     

    So, for each installation, first I must reset all these IP-assignments, stop all websites but the one in which I want to install it, execute the installation and finally change the IP-settings to the original status.

     

    may be, this is only in my german Windows version? 

     

    really creepy. 

     

    greetings

    Zash

  • alovhaug 06 Feb

    Interesting! I'm glad you were (finally) able to get it to work, although I'm disappointed that you had to also change the IP addresses. That seems like one more step that shouldn't be necessary.

    I will admit, however, that the last time I used this trick, none of the IP addresses were set, so perhaps it only works in that situation. That would be too bad. Of course, if you had to go to the trouble of stopping your website anyway, temporarily changing the IP addresses, while stupid, isn't that much worse (if we are only talking about a couple of sites).

    I've had to do write some code recently that uses ADSI to communicate with IIS. I may have to sit down and write some custom installer code that allows you to select the website. If I ever get around to doing that, I'll make sure to post it here (because this whole process is ridiculous!)

    Glad you got it working!

    --Avonelle

  • Jailen 12 May

    Great thinking! That raelly breaks the mold!
  • seyegfexfh 13 May

    mm6BlU , [url=http://daywmnspmtvf.com/]daywmnspmtvf[/url], [link=http://bskqugrszokt.com/]bskqugrszokt[/link], http://fwbozsdobqne.com/
  • actiginn 29 May

    LKYw1j , [url=http://qhzeogxmbslt.com/]qhzeogxmbslt[/url], [link=http://eisaotylkbxb.com/]eisaotylkbxb[/link], http://behzqruuknnu.com/
Post a comment!
  1. Formatting options