118
votes

I installed Visual Studio Update 1 yesterday and now when running ASP.NET services locally on IIS (not the express version). I am seeing hundreds of requests per second to the address

 http://localhost:49155/vshub/ca9dea4b016f45c68a6a8c1a07809eb4/DataWarehouseModule/dataWarehouse/getStatus/ 

What is causing this and is it preventable?

5
VSHub is the component that shows live cpu and memory usage when you debug. You don't have to use it, turn it off with Tools > Options > Debugging > General > untick "Enable Diagnostic Tools while debugging". Or just don't get annoyed by those nice debugging features.Hans Passant
Well it is annoying when you are using fiddler... thanks to KyleUp for a good solutionPoku

5 Answers

109
votes

Another option for preventing fiddler from chewing up your CPU is write a rule in fiddler to ignore those requests. Goto Rules > Customize Rules... find the function OnBeforeRequest and add

if(oSession.oRequest.headers["host"]=="localhost:49155"){
    oSession["ui-hide"] = "true";
}

so mine looks like this:

static function OnBeforeRequest(oSession: Session) {
    if(oSession.oRequest.headers["host"]=="localhost:49155"){
        oSession["ui-hide"] = "true";
    }
}

as @matrixugly pointed out the port can be different depending on the version of VS. @tedd-hansen's solution might be better across all versions of visual studio.

if(oSession.oRequest.headers["host"].StartsWith("localhost") 
    && oSession.PathAndQuery.StartsWith("/vshub/")) {
    oSession["ui-hide"] = "true";
}

Here's some discussion about this issue on github to get a better understanding of what's going on; https://github.com/aspnet/Mvc/issues/3655

Here's another post on SO for the same issue; visual studio 2015 vshub is spamming fiddler

51
votes

This is the debugger sending information back to VSHub process. It's internal communication between the two processes so that part of the debugger data collection can happen out-of-process.

It helps with debugger tooltips, performance information, the historical debugging experience and more. As such there's no way to turn it off without seriously crippling the advanced debugger features.

You can turn some of these features off (though other features may still rely on Vshub to do out-of-process work in the background):

Tools > Options > Debugging > General > [  ] Enable Diagnostic Tools while debugging

The communication is purely local and doesn't pose a serious overhead or issue. Is there a specific reason you want to get rid of it? Tools like Fiddler can be configured to filter on process, so ignoring this traffic should be simple.

18
votes

Since this has turned into ways to make Fiddler ignore the requests, the easiest way I've found is to go to the Filters tab, Request Headers section, check the "Hide if URL contains" box and enter "/vshub/".

Hiding with Filters

7
votes

I realize this is not the answer, but it may help others that come here (like me).

Expanding on the answer KyleUp gave. Adding this to the "OnBeforeRequest" method is a bit more general and stops all localhost /vshub/ debug messages from filling up the view in Fiddler.

if(oSession.oRequest.headers["host"].StartsWith("localhost") 
   && oSession.PathAndQuery.StartsWith("/vshub/")) {
    oSession["ui-hide"] = "true";
}
3
votes

This is an easier alternative to hide the vshub localhost traffic.

Go to Tools > Fiddler Options > Connections tab and add http://localhost:49155 to the bypass list. This will skip all traffic posted to that Url.