9

IIS Web サイトの下にサブ アプリケーションがあり、Visual Studio の発行ウィザードを使用して問題なく展開できます。

ただし、ビルド サーバーから展開を自動化しているため、msdeploy.exe を直接使用することを好みます。

メイン Web サイトはデプロイできますが、サブ アプリケーションをデプロイしようとすると機能しません。

これは機能します (www.mymainwebsite.co.uk は IIS Web サイトです):

msdeploy.exe -source:package='www.mymainwebsite.co.uk\obj\Test\Package\www.mymainwebsite.co.uk.zip' -dest:auto,computerName='https://testweb1:8172/MsDeploy .axd?site=www.mymainwebsite.co.uk',userName='xxx',password='xxx',authtype='Basic',includeAcls='False' -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension - disableLink:CertificateExtension -setParamFile:"www.mymainwebsite.co.uk\obj\Test\Package\www.mymainwebsite.co.uk.SetParameters.xml" -allowUntrustedInfo

これはそうではありません (SubApplication がアプリケーション パスです):

msdeploy.exe -source:package='SubApplication\obj\Test\Package\SubApplication.zip' -dest:auto,computerName='https://testweb1:8172/MsDeploy.axd?site=www.mymainwebsite.co.uk / SubApplication ',userName='xxx',password='xxx',authtype='Basic',includeAcls='False' -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"SubApplication\obj \Test\Package\SubApplication.SetParameters.xml" -allowUntrustedInfo

エラーは次のとおりです。

Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the remote computer ("testweb1") using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.
Error: The remote server returned an error: (401) Unauthorized.

私が言ったように、これは Visual Studio パブリッシュ ウィザードから機能し、Site/application プロパティを www.mymainwebsite.co.uk/SubApplication に設定するので、サーバーのアクセス許可の問題ではないことがわかります。

msdeploy パラメーターに何か不足していますか?

4

2 に答える 2

10

コマンドラインで次を使用して、Webアプリケーションを設定します。

-setParam:name="IIS Web Application Name",value="www.mymainwebsite.co.uk/SubApplication"
于 2012-09-10T12:52:04.853 に答える
1

メイン サイトのサブアプリケーションへの Web 展開を行うには、TFS に移動し、IIS アプリの展開手順で、オーバーライド パラメーターを次のように更新します。

name="IIS Web アプリケーション名",value="メインサイト/サブアプリケーション"

それはトリックを行う必要があります!!

于 2018-06-08T21:16:38.930 に答える