Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
326 views
in Technique[技术] by (71.8m points)

asp.net - Can't get my EC2 Windows Server 2008 (Web stack) instance to receive publishings of my website

I installed a fresh AMI for EC2 (http://aws.amazon.com/amis/Microsoft/5147732567196848) and have installed Web deploy 2.1 on it.

The web deploy 2.1 service is running for real as

netstat -an

Shows 8172 is being listened on by the Web Deployment Agent Service.

But, when I try to deploy to this site using Project->right-click->Publish (via web deploy) I receive the following error message

------ Build started: Project: Cir.Web, Configuration: Debug Any CPU ------
  Cir.Web -> C:ProjectsCrazyInsaneRobotSourceCir.WebinCir.Web.dll
------ Publish started: Project: Cir.Web, Configuration: Debug Any CPU ------
Transformed Web.config using Web.Debug.config into objDebugTransformWebConfigransformedWeb.config.
Auto ConnectionString Transformed ViewsWeb.config into objDebugCSAutoParameterizeransformedViewsWeb.config.
Auto ConnectionString Transformed objDebugTransformWebConfigransformedWeb.config into objDebugCSAutoParameterizeransformedWeb.config.
Copying all files to temporary location below for package/publish:
objDebugPackagePackageTmp.
Start Web Deploy Publish the Application/package to https://ec2-175-41-170-198.ap-southeast-1.compute.amazonaws.com:8172/msdeploy.axd?site=Default%20Web%20Site ...
C:Program Files (x86)MSBuildMicrosoftVisualStudiov10.0WebMicrosoft.Web.Publishing.targets(3847,5): Warning : Retrying the sync because a socket error (10054) occurred.  
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 1 of 10.
C:Program Files (x86)MSBuildMicrosoftVisualStudiov10.0WebMicrosoft.Web.Publishing.targets(3847,5): Warning : Retrying the sync because a socket error (10054) occurred.  
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 2 of 

...
C:Program Files (x86)MSBuildMicrosoftVisualStudiov10.0WebMicrosoft.Web.Publishing.targets(3847,5): Warning : Retrying the sync because a socket error (10054) occurred.  
Retrying operation 'Serialization' on object sitemanifest (sourcePath). Attempt 10 of 10.
C:Program Files (x86)MSBuildMicrosoftVisualStudiov10.0WebMicrosoft.Web.Publishing.targets(3847,5): Error : Web deployment task failed.(Could not complete the request to remote agent URL 'https://ec2-175-41-170-198.ap-southeast-1.compute.amazonaws.com:8172/msdeploy.axd?site=Default Web Site'.)
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 'https://ec2-175-41-170-198.ap-southeast-1.compute.amazonaws.com:8172/msdeploy.axd?site=Default Web Site'.
The underlying connection was closed: An unexpected error occurred on a send.
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 ==========

My firewall on the EC2 instance has been turned off. And my AWS firewall settings are

http://dl.dropbox.com/u/7881451/ec2-firewall-settings.PNG

which are the recommended settings.

Other notes/thoughts:

  • My Web Deploy Error log in the windows error log is completely empty
  • I've used web deploy before using a different AMI in the past and succeeded without problems.

If anyone has any suggestions about how to debug this, I would be so ever grateful!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I contact Microsoft directly about this problem and they had an immediate answer for me.

From MS guy:

It looks like your Web Management Service not contactable. I have seen this before when the certificate for the service is invalid. Can you run the attached script on your server?

  1. Start a PowerShell prompt elevated
  2. Run set-executionpolicy unrestricted –force
  3. Run .0_Certificate.ps1
  4. Net stop wmsvc
  5. Net start wmsvc

Does this fix the problem?


The script he is referring to is available here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...