2012-06-05 6 views
7

Sto provando la distribuzione sul Web.MsDeploy non riesce per webdeploy

Perché volevo essere in grado di riprodurre questo, ho usato un sistema di test

Windows 2008 RC, IIS 7.5 + distribuzione del pacchetto ho configurato distribuzione utilizzando http://learn.iis.net/page.aspx/516/configure-the-web-deployment-handler/ Abilitato tracciando http://technet.microsoft.com/en-us/library/ff729439(v=ws.10).aspx

ho creato una nuova applicazione di servizio WCF, (modificato nulla) lo ha compilato e provato a distribuire

Ricevo la seguente risposta (dopo alcuni minuti)

------ 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 ========== 

e nessun registro (sul tutto) sul lato server dev1.

Ho provato molte varianti, ma questa è la cosa più semplice e semplice da riprodurre. e sta fallendo.

qualche idea?

+0

sguardo http://mperlstein.blogspot.co.il/2012/ 04/web-distribuzione-on-iis7.html –

risposta

9

Ho trovato il problema.

al posto di "http: //" dev1: 8172/msdeploy.axd ho usato dev1: 8172/msdeploy.axd

questo è actaully lo stesso di "https: //" dev1: 8172/msdeploy. axd, che per qualche motivo è dove l'agente di distribuzione ascolta.

Da qui, si otterrà un nuovo errore:

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. 

Questo perché non si dispone di un certificato per SSL.

Nella finestra profilo di pubblicazione, è necessario controllare la casella di controllo "Consenti certificato non attendibile"

e Pubblica dovrebbe succceed. buona fortuna

0

dal passare del certificato:

Fase 1:

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

fase 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; 
}