我有一个 ASP.NET MVC Web 应用程序项目,我想将它部署到我的 IIS 网络服务器。站点树是这样设置的:
SERVERNAME(myDomain\Username)
Application Pools
Sites
Default Web Site
MyProjectSite
bin
Content
...
Views
我正在尝试部署到 MyProject 站点。请参阅下面我使用的设置与我返回的错误。我显然没有正确指定我的站点路径,但对于我的生活,我无法弄清楚它应该是什么。
以下设置在迭代之间保持不变:
/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=False /p:MSDeployPublishMethod=WMSvc /p:AuthType=Basic /p:Username="myUserName" /p:Password="MyPassword" /p:AllowUntrustedCertificate=True
将 SiteName/ 指定为 IISAppPath:
参数:
/p:MsDeployServiceUrl="https://serverName:8172/MsDeploy.axd?Site=MyProjectSite" /p:DeployIisAppPath="MyProjectSite/"
错误:
Could not complete an operation with the specified provider ("createApp") when connecting using the Web Management Service
- 我不想创建新网站。我想同步已经存在的内容。
将 IISAppPath 指定为 Root(假设使用 URL 中的站点名称)
参数:
/p:MsDeployServiceUrl="https://serverName:8172/MsDeploy.axd?Site=MyProjectSite" /p:DeployIisAppPath="/"
错误:
Could not complete an operation with the specified provider ("iisApp") when connecting using the Web Management Service
- 看起来它正在尝试访问默认网站或其他东西(我故意没有赋予自己权利)。
将 IISAppPath 指定为空字符串(假设使用 URL 中的站点名称)
参数:
/p:MsDeployServiceUrl="https://serverName:8172/MsDeploy.axd?Site=MyProjectSite" /p:DeployIisAppPath=""
错误:
The "ConcatFullServiceUrlWithSiteName" task was not given a value for the required parameter "SiteAppName"
- 所以它将“”解释为实际上是一个空值,从而破坏了连接它的尝试。
在 URL 中不指定站点属性,但将 SiteName/ 指定为 IISAppPath
参数:
/p:MsDeployServiceUrl="https://serverName:8172/MsDeploy.axd" /p:DeployIisAppPath="MyProjectSite/"
错误:
Could not complete an operation with the specified provider ("createApp") when connecting using the Web Management Service
在 URL 中不指定站点属性,但将 SiteName 指定为 IISAppPath
参数:
/p:MsDeployServiceUrl="https://serverName:8172/MsDeploy.axd" /p:DeployIisAppPath="MyProjectSite"
错误:
Could not complete an operation with the specified provider ("createApp") when connecting using the Web Management Service
现在鉴于它在 SiteAppName 上运行连接,它必须将它与站点名称结合起来,是吗?你应该放什么来让网站同步到网站的根目录?
更新
为了找出正确的路径方案,我尝试使用 Visual Studio 2012 发布对话框进行发布。在这种情况下,我收到一条错误消息,指出请求超时(测试连接几乎可以立即工作,预览更改工作但需要几秒钟)。我检查了事件日志,wmsvc 的跟踪日志无济于事。即使将跟踪设置为详细,跟踪日志中也不会显示任何内容。我已尝试禁用两台计算机上的防火墙,但在这方面似乎也没有任何效果。