7

Web デプロイを試みています。

これを再現できるようにしたかったので、テストシステムを使用しました

Windows 2008 RC、IIs 7.5 + 展開パッケージ http://learn.iis.net/page.aspx/516/configure-the-web-deployment-handler/を使用して展開を構成しました トレースを有効 にしましたhttp://technet.microsoft.com /en-us/library/ff729439(v=ws.10).aspx

新しい WCF サービス アプリケーションを作成し、(何も変更せずに) コンパイルしてデプロイしようとしました

次の応答が返されます(数分後)

------ Build started: Project: WcfService1, Configuration: Debug Any CPU ------
  WcfService1 -> C:\Development\BrandShield\Services\WcfService1\bin\WcfService1.dll
------ Publish started: Project: WcfService1, Configuration: Debug Any CPU ------
Transformed Web.config using Web.Debug.config into obj\Debug\TransformWebConfig\transformed\Web.config.
Auto ConnectionString Transformed obj\Debug\TransformWebConfig\transformed\Web.config into obj\Debug\CSAutoParameterize\transformed\Web.config.
Copying all files to temporary location below for package/publish:
obj\Debug\Package\PackageTmp.
Start Web Deploy Publish the Application/package to http://dev1:8172/msdeploy.axd/MSDEPLOYAGENTSERVICE ...
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Error : Web deployment task failed.(Could not complete the request to remote agent URL 'http://dev1:8172/msdeploy.axd/MSDEPLOYAGENTSERVICE'.)
This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server.
Error details:
Could not complete the request to remote agent URL 'http://dev1:8172/msdeploy.axd/MSDEPLOYAGENTSERVICE'.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Publish failed to deploy.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

dev1 サーバー側には (まったく) ログはありません。

私は多くのバリエーションを試しましたが、これが最も簡単で再現しやすい方法です。そしてそれは失敗しています。

何か案は?

4

3 に答える 3

10

問題が見つかりました。

"http://" dev1:8172/msdeploy.axd の代わりに dev1:8172/msdeploy.axd を使用しました

これは、実際には "https://" dev1:8172/msdeploy.axd と同じであり、何らかの理由で展開エージェントがリッスンする場所です。

ここから、新しいエラーが発生します。

Could not complete the request to remote agent URL 'https://dev1:8172/msdeploy.axd?site=Default web site'. 
The underlying connection was closed: 
Could not establish trust relationship for the SSL/TLS secure channel.
The remote certificate is invalid according to the validation procedure.

これは、SSL 用の証明書がないためです。

公開プロファイル ウィンドウで、[信頼されていない証明書を許可する] チェックボックスをオンにする必要があります。

パブリッシュが成功するはずです。幸運を

于 2012-06-05T15:12:29.483 に答える
0

証明書をバイパスします。

ステップ1:

System.Net.HttpWebRequest req = (HttpWebRequest)WebRequest.Create(Url);
ServicePointManager.ServerCertificateValidationCallback = AcceptAllCertifications;

ステップ2:

public Boolean AcceptAllCertifications(Object sender, System.Security.Cryptography.X509Certificates.X509Certificate certification, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
{
    return true;
}
于 2017-03-25T05:08:27.583 に答える