Disable Visual Studio ASP.Net debug from launching browser - asp.net

How do I configure Visual Studio to stop launching a broswer window ever time I debug an ASP.NET project?

In the properties of the web project on the Web tab (VS2008) under Start Actions, or directly under Start Options in other versions of Visual Studio. Select the "Don't open a page. Wait for a request from an external application" radio button.
That should do the job. But will probably find you need a browser to test it.

The best way to beat this is to Build Solution (right click solution -> Build Solution) and just use the browser as normal. It executes faster too, which is a plus.

I'm using VS2013. The way i do it is to right click on the project name --> Properties --> Web --> choose "Don't open a page. Wait for a request from an external application"

Related

How to stop/close SignalR service

I just upgrade from VS2010 express to VS2013 express and open my project.
I found the SignalR is running but I don't need it.Firebug is filling with SignalR message.I take long time to search how to stop/close it,but I can't find it.
On your toolbar in between the debug and the browser choice there is a button called browser link - click it and de-select the "Enable browser link" and you should be good to go...

ASP.NET Debug server without debugging IE

I have an ASP.NET application in visual studio 2010, and whenever I start debugging, it attaches the debugger to IE as well as the server, which just creates loads more bloat and makes everything run slowly.
How can I start debugging on the server only?
Andy
Once the application is deployed to IIS, you can use Visual Studio on the server to attach to the web process. Also, see how to debug deployed web applications.
There is no way to start debugging of an ASP.NET site in Visual Studio without it launching a browser. So set the default browser to a different browser that you want to use so you don't waste spawning an IE instance. From Setting a Default Browser for Visual Studio:
Open a WebForm file in VS (anything ending in .aspx will do)
Select the "Browse With..." option from the File menu
Select your preferred browser from the list and click the "Set as Default" button
One way is to browse with option by clicking the browse with option and the other way is to set the default browser as any other browser than IE

Debugging Websites with Google Chrome

When writing an ASP.NET website, Visual Studio allows me to specify which browser to use for debugging. I've just started playing with MVC 3 and I'm not seeing any such option.
With MVC, debugging occurs in Google Chrome, which is fine except that Visual Studio doesn't recognize when I've closed the browser. I must then manually shut down the debugger.
Is there a way to either A) have the Visual Studio debugger recognize when I've stopped debugging the website in Chrome, or B) specify that IE should be used when debugging? (I prefer to keep Chrome as my default browser when browsing the Web.)
When you debug a web application, Visual Studio simply attaches itself to the IIS process (or the development server process, if you're using that), and starts the browser with the correct URL. The browser doesn't even know you're debugging. With IE, Visual Studio performs some additional inter-process voodoo to detect when IE closes; other browsers however are unaware of this mechanism and simply do what they always do - display the page until the user closes it. So your choices are:
Live with the fact that you'll have to close the browser manually
Reuse browser windows (instead of running the browser from inside Visual Studio, use "Attach to process" and open the page manually)
Bite the bullet and use IE
I believe this extension allows you to choose your browser with MVC applications. Or, you could just add a normal HTML page, and set the browser default on that. This should become the default for the rest of your project.
To keep IE as you browser right click on an aspx file and click browse with. you should be able to set a default from there.
If you don't have an aspx form just create one, set pref then delete.

how does VIsual Studio 2010 decide which projects to start up in a webdev instance?

I have a solution with two web applications/projects. Both start up on F5 but on shift+F5 only one stops forcing me to manually close the webdav of the second one application. I don't want to create marcos to shut down the process and I don't see the properties window with the option in this thread I just see normal properties pages of the project.
So if I don't manually stop the webdev server and I press F5 again I get a message "Unable to start debugging" because the port is fixed on the web app which didn't stop. Note that it says "Unable to start debugging" not "Unable to start debugging in the web dev".
How does VS decide ok let me run this two web applications but if I have two winform apps its smart enough to start just the strat up project ? Thank you
PS: I don't believe it's in the build files, so where is it ? In the loaded environment or something ?
Click on your project in solution explorer that you dont want to start up, and in the properties window set "Always start when debugging" to false. If you don't see the properties window, press F4 or go to View -> Properties Window. I usually set that to false for all projects and then only the project set as the startup project will start.

Profiling ASP.NET websites with EQATEC Profiler

I'm searching for a free ASP.NET profiler, and I stumbled upon EQATEC Profiler for .NET, but I can't find any instructions on how to profile ASP.NET projects with it. Please post step-by-step instructions or a link with sufficient info.
I'm using Visual Studio 2008 Professional and .NET 3.5.
It looks like they have changed their user interface since Pavel's instructions were posted. Here are the instructions I wrote up for my team. They replace steps 4-8 in Pavel's post.
To profile an ASP.NET application using EQATEC, just select the application’s bin folder in the App Path setting.
Then, click the Build button at the bottom of the form.
Then, load your app and go to the page you want to profile. Go to the Run tab and click the Reset Counters button.
Then, do the action that you want to profile. When it’s done, click the Take Snapshot button.
When that is done, a snapshot report will appear in the bottom list. You can double-click on it to view it.
This should work for ASP.NET web projects:
Compile your project.
Start web application. You can right-click on some .aspx file in Visual Studio and select "View in Browser". (If you start your application later you risk overwriting profiled DLL.)
Start EQATEC Profiler.
On the Build tab browse to bin folder of your project.
Click “App options” button
Set output folder to $(AppDir) only.
Uncheck “Ordinary app”.
Click Build button.
Switch to your favourite browser. Navigate to the page you want to profile. You should get "Profiled app started" entry in Run tab in EQATEC Profiler.
Click "Take snapshot" button. A new entry should appear in "View snapshot reports" list. Select it and click View button.
Edit: Updated instructions according to comment.
From the EQATEC forums:
ASP.NET?
tracing asp.net web application
Profiling web application
You may need to get a compiled version of your site (is there a dll for the site in the bin folder or just the dependencies?).
The easiest way to do this is to publish it. (Just right hand click the site in Visual Studio). Then Pavel's answer will work just fine.

Resources