Вопрос

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.

Это было полезно?

Решение

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.

Другие советы

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top