Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publish Wizard Errors in VS2010 and 2012

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.

like image 989
Nick Albrecht Avatar asked Jun 06 '12 16:06

Nick Albrecht


1 Answers

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.

like image 88
Sayed Ibrahim Hashimi Avatar answered Nov 07 '22 15:11

Sayed Ibrahim Hashimi