开发者

using appcmd to add new web site issue

开发者 https://www.devze.com 2022-12-09 14:23 出处:网络
I am using VSTS 2008 + C# + .Net 3.5 + IIS 7.0. I want to using appcmd to add a new web site, my scenario is like this.

I am using VSTS 2008 + C# + .Net 3.5 + IIS 7.0. I want to using appcmd to add a new web site, my scenario is like this.

  1. All my web site files are under folder c:\template;
  2. I w开发者_如何学编程ant to add my new web site as a virtual directory under default web site, the virtual directory is called "testsite1";
  3. I want to use the default application pool (or the application pool which default web site is using).

I have stuied appcmd for quite some time, but cannot figure out. Maybe either I am too stupid or because IIS 7.0/appcmd is new, help information is limited. :-)

Appreciate if anyone could let me know how to complete my deployment task using appcmd?

thanks in advance, George


  1. You must open the command prompt as Administrator
  2. Execute the following:

    "%windir%\system32\inetsrv\AppCmd" add app /site.name:"Default Web Site" /path:/testsite1 /physicalPath:"c:\template"
    

How I found this out? I did the following:

appcmd add app /?

and there was this example:

appcmd add app /site.name:"Default Web Site" /path:/app1

so I just added physicalPath

check this also.

0

精彩评论

暂无评论...
验证码 换一张
取 消