Alexander Schmidt
Alexander Schmidt

Reputation: 5733

Web deployment task failed when using WebDeploy in VS2012

When I hit publish on a VS2012-MVC4-Project, enter my credentials (local domain) and hit "Validate connections" I get the error-message:

"Web deployment task failed. (Unexpected end of file has occured. The following elements are not closed: results. Line 1, position 586.)"

The server is running Win Srv 2008 R2, IIS 7.5, Web Deploy 3.0.

Importing using the import-option on the target IIS-Management-Studio and selecting the ZIP-file create by VS will work without any problems.

The strange thing is, that WebDeploy already worked. This error comes and goes and I can't figure out, what the reason is.

Sounds like the WebDeploy-service isn't responding well-formed.

My settings are: Service UR: http://{NAMEOFSERVER} Site/application: Default Web Site

Upvotes: 9

Views: 6626

Answers (3)

Chris
Chris

Reputation: 10216

I was getting the same error, albeit while trying to pull from one web server to another using msdeploy.exe (rather than while trying to push from Visual Studio specifically).

In my case the error may have started shortly after changing the SSL certificate on the source web server. In any case, following a suggestion on some MSDN forum, I was able to solve the problem by restarting two services on the target machine, Web Deployment Agent Service and Web Management Service.

Upvotes: 0

unforgiven1987
unforgiven1987

Reputation: 464

I had the same issue, even though I was pointing to the proper url. It turns out I had Fiddler running and that was interfering with the request/response.

Makes sure you don't have any packet sniffers or proxy services running.

Upvotes: 14

Alexander Schmidt
Alexander Schmidt

Reputation: 5733

Got it. After I right-clicked the "Default Web Site" in IIS-Manager and clicked on "Configure for Web Deploy Publishing..." I saw, that my publishing URL is not http://{server}:8172 but https://{server}:8172.

So to everyone with that problem: It has to do with SSL and the certificate. You have to trust the cert after you type in this Service URI inside the Publishing assistent. Then it worked!

Upvotes: 3

Related Questions