Publish Wizard Errors in VS2010 and 2012 - visual-studio-2010

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.

Related

Blazor webassembly unable to put breakpoints

The goal is to be able to debug the client part of my blazor application. For this, in the sources accessible in the browser, I need to put breakpoints. The problem is that the sources are not apparent in the browser.
When I start my project in debug, I go to the localhost with the port of the sslPort property of the lauchSettings.json file
Then with Shift+Alt+D I will retrieve the instruction to execute.
I have the new window that appears, if I do Shift+Alt+D again I have the source tab that appears but there is no file:// folder as mentioned Debug ASP.NET Core Blazor WebAssembly in the Debug in the browser section
For information, at first I could not access part 2 because I had the following error:
websocket disconnected
I managed to make progress by following this post:
https://github.com/dotnet/aspnetcore/issues/26824#issuecomment-707825522
Has anyone encountered this error or have a clue?
I finally found the problem, but I don't know the real cause.
Below I explain my problem in case it can help someone, because I spent a lot of time to understand.
My post was intended but to help me put breakpoints in my client side code of a Blazor WASM application.
While setting the breakpoints in Visual Studio, I had an error telling me that the source code was not found, which is why I wanted to try the method through the browser sources.
I decided to go back to my original problem in Visual Studio.
I noticed that I can only debug projects that are stored in the source/repos directory in the folder. I tried in a VM, in it I can store my projects anywhere on disk.
On my pc, I found that Visual Studio is installed on disk C, but it also has settings on another disk, my 2 disk organization seems to be the cause. Because if I create or move the projects anywhere on the other disk, it works every time, if I take this project and put it on disk C, it doesn't work anymore. Unfortunately I didn't have the problem for a test project I created while trying to figure it out, so I see it can possibly be fixed.
To recap, if you have 2 disks with Visual Studio present on both, try testing on the other disk.

getting current background transfer tasks returns empty list on UWP

I use the background transfer tasks to download files in my UWP c# application. When the app is closed and reopen, we normally can discover the pending tasks with the function GetCurrentDownloadsAsync.
Unfortunately, it returns always an empty list even if the task is not completed.
It did not manage to compile the https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BackgroundTransfer sample to see if the behavior is the same.
Does someone have a solution?
Unfortunately, it returns always an empty list even if the task is not completed
By testing on my side I cannot reproduce your issue. I tested with the official sample, after closed with one task still in progress, and then reopen, the count of BackgroundDownloader.GetCurrentDownloadsAsync() will return to one correctly. Here is the testing result:
My testing environment is OS build 15063. Please also tried to test the official sample on your side. And please ensure that you "closed and reopen" the app, not uninstall since when an app is uninstalled any current or persisted Background Transfer operations associated with it are cleaned up. More details please reference this article.
If you still have issues, please upload a minimal reproduced project.

Error 503 Service Unavailable when using localhost with Visual Studio

I'm posting this to save others a day wasting time trying to solve this.
My PC froze during a build and publish of my web application, so I had to switch the machine off and back on again. This coincided with a Windows Update being applied when the machine restarted.
After this I could not run the web application in Visual Studio, getting a Error 503 Service unavailable.
After trying everything mentioned here and elsewhere on the web, I noticed an app_offline.html file sitting in the solution folder. The file was empty.
I deleted the file and of course it all starts working. This file had been left during the incomplete build process.
So, hope this helps someone else.
Delete the app_offline.html file if one has been left after a broken build and publish process.
If you have IIS. Then go to IIS and click Application Pool, then click on default application pool and the clik on START.

Build always takes forever

When I queue my builds in VS 2013 using the "Hosted Build Controller"(Visual studio online) my build keeps saying:
![enter image description here][1]
Position In Queue = 1 (Waits in the Queue for more than half an hour)
It is not starting my builds inspite that fact that I have no other builds in queue or or running.
Sometimes it gives me the message saying the connection to the build server was lost.
Not Sure why this is happening because earlier when I initiated my builds using VS 2010, my builds used to start immediately.
Any help is greatly appreciated.
You're dealing with what can be a painful issue. Have you tried creating another agent? You can specify which agent to use when queuing the build. If other agents work and not this once, you may have encountered a bug that requires updates to your current version of TFS.
If new agents consistently fail or don't fail always, then you're dealing with a bigger issue that can be due to performance, cross-geography issues, or with too much latency loading your template. I believe one thing that can cause issues with this is having too many agents. I would also try clearing your build caches out. C:\users[user]\appdata\local\temp (i.e. BuildAgent/Controller). Also, definitely make sure your build software matches your TFS version (including the update). Slight differences there can cause issues.

MVC3 Ap in Visual Studio 2010- Changed to use Local IIS Web Server and can not get it back to VS dev server

I changed from running Use Visual Studio Development Server to Local IIS Web Server becasue I read it would create the virtual directories properly - it did not - once I navigate out of the account area I get
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Requested URL
https://localhost:443/xxx/Index
Physical Path
C:\inetpub\wwwroot\xxx\Index
I have been googling and trying to get it to work, but can not and can no longer debug - Now I am trying to change it back and it keeps starting in Local IIS Web. I have HOSED myself and don't know where to go from here.
Thank you
In terms of getting back to using the VS web server you should just need to:
Right click on the web project in VS
Selection properties
Go to the web tab
Select "use visual studio web server" radio button
For the sake of not leaving questions unanswered, I tried all of the suggestions above, and many more, and got nowhere. I was in an early phase at the time, and I had to move on, so I ended up creating a new solution, and porting things over. Not the best idea, but I had to go forward, and I had taken enough time. It is still living on my machine, and I plan to go back and figure it out at some point. Hopefully, I'll have more understanding and will be able to post what I did wrong so someone else can save some time. Thanks all for attempting.

Resources