开发者

How extend a website on same url but different port using stsadm

I'm trying to automate a sharepoint deployment and one of the tasks is to extend the web application using the stsadm command extendvsinwebfarm. However I'm constantly getting the error:

The IIS Web Site you have selected is in use by SharePoint. You must select ano ther port or hostname.

I think the problem is because I'm trying to extend web application using the same url. For开发者_如何学Python example my cms site is:

http://myserver:8083

and i want my extended site to be:

http://myserver:80

Is it possible extend the web application using the same url via stsadm?


Yes, but the URL you pass into extendvsinwebfarm should have the port on it.

Using reflector it seems the Run method of the SPExtendVsInWebFarm class calls this: SPVirtualServer server = globalAdmin.ExtendVirtualServerInWebFarm(uri, virtualServerName, userTypedIn, appPoolId, bConfigurableAppPoolAccount, appPoolUserName, appPoolPassword, bAllowAnonymous, flag4);

The Uri that is passes has it's port extracted and that port is used to set up the web app.

Just tested this on our junk farm and so long as your url is in the form http://stuff:portnum then it all works.


I think this is normally done by creating the extended site with whatever port SharePoint/stsadm demands, then changing the port to what you want in IIS.


Ended up using some tools from: http://stsadm.blogspot.com/

Does exactly as i wanted and more....

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜