STSADM createsite error "another site already exists at..."

Today I was building some simple deployment CMD files for a project and one of them was for creating a site.  I used the stsadm createsite command and picked all my parameters that I wanted and hit enter.  Below is the command that I used.

stsadm -o createsite -url http://DONGENU:9001/Thinking -owneremail woxing615@163.com -ownerlogin  wudongenu/administrator -lcid 1033 -sitetemplate SPSPORTAL#0 -title "Thinking" 

After a few seconds it came back with the below error message and this definitely caught me by surprise.

 

Another site already exists at http://DONGENU:9001.  Delete this site before attempting to create a new site with the same URL, choose a new URL, or create a new inclusioin at the path you originally specified.

After reading the error message a couple times I knew the first part wasn't true because there was no site at that URL path but then it dawned on me that the second part of the error message was the answer to my problem.  The URL that I specified has a "Managed Path" and I forgot to create it before running the createsite command.  So, I went out to the online STSADM technical reference guide and found the stsadm addpath command.  I opened up the CMD file and add the following line above the createsite command and reran it and everything worked just fine.

stsadm-o addpath -url http://DONGENU/MySite -type wildcardinclusion 

I know this wasn't really a hard one but at first when I read the error message it wasn’t making any sense but after ignoring the first part of the error message the second part turned the light on for me.

Last,Below is the command that I used.

stsadm -o createsite -url http://DONGENU:9001/MySite/Thinking -owneremail woxing615@163.com -ownerlogin  wudongenu/administrator -lcid 1033 -sitetemplate SPSPORTAL#0 -title "Thinking" 

Operation completed successfully.

 

Cheers 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值