Publish Wizard Errors in VS2010 and 2012
Asked Answered
C

2

6

I've been using the Publish Wizard in VS2010 to deploy my MVC app and I've got no issues there but intermittently the publish will fail with the following error.

Error 23 Web deployment task failed.(Could not complete the request to remote agent URL 'https://webserver:8172/msdeploy.axd?site=mysite'.)

Could not complete the request to remote agent URL 'https://webserver:8172/msdeploy.axd?site=mysite'. The request was aborted: The request was canceled. COM object that has been separated from its underlying RCW cannot be used.

It seems to happen at random but the longer I have VS open the more likely it is to occur and the guaranteed way to fix it is to restart VS but it occurs like clockwork if I leave VS open for prolonged periods of time (all day or overnight) and is starting to get very frustrating to have to restart VS every time it happens. I honestly don't recall if the error number is always 23 or not, I'll look for that next time it happens, but has anyone else had this problem or know what might be causing it?

Update: The problem is still present when using VS2012 as well.

Chimb answered 6/6, 2012 at 16:25 Comment(1)
I've seen the same thing and have reported it to the VS and Web Deploy teams at Microsoft.Mightily
S
11

We discovered this bug shortly after finalizing the RTW components for web publishing. To give you a bit of background, the underlying issue was very difficult for us to uncover. After some through investigation we were able to pinpoint the issue to being related to how internet connections are managed by the singleton RCW object used by WPF and whether requests are coming in on an STA or MTA thread.

Fortunately we were able to workaround the underlying issue and have a fix ready. We are planning to update the web publishing bits in a few months which should resolve this issue once and for all. Until then the workaround is to close VS and then re-open it. I know that this is not an ideal workaround, but that is the best that we can do at this time.

Strangulate answered 11/9, 2012 at 19:22 Comment(5)
Thank you very much for looking into this and posting your findings, I really appreciate it. I look forward to trying out the updated Web Publishing bits!Chimb
Is this fixed in VS2012 Update 1?Falla
The fix is available in the Azure SDK windowsazure.com/en-us/develop/netStrangulate
I just got the same error so I would say it's NOT included in VS2012 Update 1, which to be honest strikes me as odd. I don't do any Azure development, Do I still have to install the Azure SDK just to get this fix?Chimb
Sorry the fix is only available through the Azure SDK. We've heard some feedback from others as well about this. The reason why its in the Azure SDK currently is that standing up a dedicated feed for this would be very costly (i.e. we couldn't ship other features due to working on this). The best thing to do here would be to create a suggestion on aspnet.uservoice.com and have it voted up.Strangulate
W
0

According to http://www.asp.net/mvc/tutorials/deployment/deployment-to-a-hosting-provider/deployment-to-a-hosting-provider-creating-and-installing-deployment-packages-12-of-12

"COM object that has been separated from its underlying RCW cannot be used." Scenario You have been successfully using one-click publish to deploy your application and then you start getting this error:

Web deployment task failed. (Could not complete the request to remote agent URL 'https://serverurl.com/msdeploy.axd?site=sitename'.) Could not complete the request to remote agent URL 'https://url/msdeploy.axd?site=sitename'. The request was aborted: The request was canceled. COM object that has been separated from its underlying RCW cannot be used.

the solution is:

Possible Cause and Solution Closing and restarting Visual Studio is usually all that is required to resolve this error.

Wabash answered 21/8, 2012 at 12:59 Comment(4)
That's not a solution, it's a workaround. That's like telling some one every time their internet goes down they have to reboot their cable modem. I am looking for something that can explain why it happens and how to prevent it from happening. I have also gotten the error in Visual Studio 2012 so it's not something they've fixed yet.Chimb
@Yarx yes I agree it is not a solution. But by restarting people can continue working.Wabash
True, but I already stated in the question that restarting Visual Studio fixes the problem, I'm looking for feedback on what caused it so I can prevent it from happening.Chimb
If it helps debugging, - everything was working fine for me for a long time deploying to subdomain: subdomain.awesam.net - Then in the publish window I changed the site to awesam.net and published it. - Then in the publish window I changed it back to subdomain.awesam.net and it stopped working. I have not been able to reproduce.Poilu

© 2022 - 2024 — McMap. All rights reserved.