ASP.NET Debug server without debugging IE - asp.net

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

Related

Keep running IIS Express and my web page after closing visual studio

I would like to know if there is a way to keep IIS express and my web page running after closing Visual Studio. I am not just closing debug session but I want to close Visual studio itself.
Is it possible?
If nor, can I achieve that using command prompt?
It could be your project settings. Please check if you have enabled edit and continue in debug mode:
In Visual Studio, right click your web project in the Solutions Explorer > click Properties > select the 'Web' tab on the left pane > uncheck the 'Enable Edit and Continue' checkbox on the right pane.
Then run your web project and the IIS Express should retain listing of your web site even after you stop debugging.
I must say it wouldn't retain the web site after closing Visual Studio.
i am not sure there is anyway to keep open IIS Express.but
you can host website on local IIS to access your website or webpage

Visual Studio 2010 displays IIS 7 page on debug instead of my project

This is my first ASP.NET project so I am a bit of a rookie when it comes to a lot of the configuring of IIS/Visual Studio so bear with me...
I am using Visual Studio 2010 running on Windows Server 2008 SR2. We recently did some updates on the server and now my project no longer loads when I attempt to debug. When I try to debug the default "Welcome" page for IIS 7 loads instead of my project. I am set up to use the development server to debug, not IIS so I don't understand why I get the IIS page. Before the updates the debugger was pulling up my page without any issues.
Any ideas? Thanks in advance!
It looks like IIS is now bound to the port number that Visual Studio Development Web Server was using previously. You can change the port number in the properties of the web site project.
I have found a solution to my issue. I decided to use IIS instead of the Development Server for debugging. After attempting to debug unsuccessfully yet again, I took a look at the identity that was being used in the application pool and I changed to one with more privileges and that seemed to do the trick. Thanks for the suggestions.
I had the same problem but non-of the earlier answers worked.
I am using Windows 7 enterprise 64-bit, IE11, VS2010, Silverlight 5
I have been developing and maintaining a number of Silverlight projects for the past 5 years, and have always been able to debug them within VS2010 using the ASP.NET Development Server. However, on returning from some well deserved holiday, I found that none of my existing Silverlight projects would run in the debugger. In each case there is a Web project set as the start-up project, and in each case on starting the project within VS2010 (with or without debugging) I got the IIS7 web page instead of my application.
I tried creating a new Silverlight web application, and found that this started normally in the ASP.NET Development Server. I checked my source code and found that no changes had been made in my absence.
After a lot of head scratching, etc., the solution was to clear the IE cache. These are the explicit steps I used:
Close all instances of IE and ASP.NET Development Server.
Open Internet Properties from the Control Panel.
Click "Delete" on the General Tab.
In the Delete Browsing History box check the following options:
a) "Preserve Favourites website data"
b) "Temporary Internet files and website data"
c) "Cookies and website data"
Leave the others unchecked
5) Click "Delete" and wait for the command to complete.
6) Close the Internet Properties box.
7) Rebuild ASP.NET project
8) Start (with or without debugging) in VS2010 - it should now load normally.
Hope this works for you.

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.

Disable Visual Studio ASP.Net debug from launching browser

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"

Why can't I edit my ASP.NET Web application at run time?

Why are the code-behind pages for an ASP.NET web application locked at run time? I have older projects (probably defined as "web sites" instead of "web apps") where I can edit the code behind, refresh the browser, and see my changes. With the web app, I have to continually close and reopen the browser if I want to see my changes live. Is there a setting or something I'm missing to allow me to edit at run time, and without restarting the debugging session?
You can enable Edit and Continue in the project properties. Right click the project in the solution explorer, select the Web tab and check Enable Edit and Continue.
Now you can edit your sources, but you have to pause the debugger to do so.
When using IIS as your development server, Edit and continue is not currently available for Visual Studio for ASP.NET.
See this blog entry, however, that shows it is possible for the Visual Studio 2005 Web Application Project Project type. It requires using the Visual Studio Development Server (Cassini) during development instead of your local IIS (see the properties box on the project).
No, in web applications, the codebehinds are pre-compiled into dlls, so any change in the dlls will recycle the App pool, and stop your debugging session,
If you press ctrl-F5 instead of just F5 to start (or host you site in IIS), you start without the debugger, and don't need to restart the browser all the time...
Unless you really really need to debug a problem you can't figure out, You should start the web app without debugger, makes it snappier to start up. Every minute spent debugging is a minute not spent writing a unit test. IMHO you should write unit tests, they last longer.

Resources