Visual Studio 2017 Launches Two Instances Of IE When Debugging A Single Project - asp.net

My development machine was recently renamed and updated to Windows 10. While debugging a single ASP.Net project in VS 2017, I press F5 and two instances of the same page show up in my IE-11 Browser (Two Tabs - Same Page) which screws up the debugger. It works fine when I launch under chrome but I need to debug IE for now since it is still the company standard.
Has any seen this behavior and is there a way to fix it?
Thanks for any insight - it's driving me crazy.

After a lot of head scratching, I finally came up with the solution and it was one of those things where it was simple. After the Windows 10 upgrade occurred, the software went and reset all of my IE 11 browser settings. There is an option on the first option page that says "Start with tabs from last session". This was selected and every time a new VS browser window fired up it went and created a tab from my previous session. I selected the other option "Start with home page" and the problem went away.

Related

Configure Visual Studio or Chrome To Launch Multiple Asp.Net Projects In The Same New Browser Window

I have a solution in Visual Studio 2017 with multiple Asp.Net startup projects.
Current Behavior
When I start debugging each project starts in a new Chrome window with a single tab.
Desired behavior
When I start debugging all web pages start in the same new Chrome window, each in its own tab.
I had the desired behavior in Brave browser, apparently by default—but for business reasons I now need to switch to debugging primarily in Chrome.
So, I suspect this is a browser setting, but as long as I get the desired behavior I am willing to adjust settings in either the browser, Visual Studio or both.
UPDATE:
To be clear this is not:
How to use the same browser window every time you start a project in Visual Studio?
Nor is it:
Stop Visual Studio from launching a new browser window when starting debug?
I do want a new browser window, apart from any previous debugging and indeed a separate instance from any browser I may have already started on the same machine.
To Launch Multiple Asp.Net Projects In The Same Browser Window
You can go Tools menu => Options => Project and Solutions => Web Projects, then you can find a setting called:
Stop debugger when browser window is closed, close browser when debugging stops
Uncheck it and click OK, then you can start the multiple projects in same Browser Window. Note: This behavior after uncheck that setting may not meet all your needs.It will not open in new Chrome instance but in a already running Chrome instance if it exists.
When set the Chrome as default browser in VS. If you've already have a Chrome browser running, start the solution and it will open several tabs in that existing Chrome instance. And only when you have no Chrome instance running, it will start same new Chrome browser window as you expected. So actually this setting only meet part of your expected behavior I guess.
To Launch Multiple Asp.Net Projects In The Same New Browser Window
It seems only when you have no Chrome instance running, this behavior can be reached. And as far as I know, there's no setting in VS can configure VS to always launch Chrome in a new instance with several tabs when start the solution with multiple startup projects.So maybe you can go Developer Community to share your requirement to the Product Team by Suggest a Feature option. Hope it makes some help:)
To avoid using an open browser you can use Browse with... if you can give any argument to chrome however arbitrary, it will open a new browser window. It provides the chrome instance a new "signature" and VS will see the browsers as separate applications.

Visual Studio 2017 release 15.7.3 does not launch application successfully

I have a fairly standard web application with a single HELLO WORLD aspx test page, so for the purposes of this question, that is the start page.
When I run the app from visual studio by pressing f5 I get "Cannot reach this page" or whatever the 404 equivalent is in each browser. (chrome: "this site can't be reached"). In firefox, the page runs successfully first time, firefox doesn't have any debugger attachment add ins, so the problem seems to relate to debugger attachment in IIS express
If I wait a few seconds, and then F5 the browser (IE or chrome), the expected page loads successfully, so it seems to be a delay in IIS starting when a debugger is attached.
I'm wondering if anyone else has hit this and whether they have a solution. We have a quite a few tweaks in web.config to meet high security needs but otherwise I can't think why it would go wrong.
Workaround is to wait a few seconds and press f5, but thats kind of annoying when you're trying to get on with things.
As described by O.H., and verified by user2728841, the solution for me was:
Tools > Options > Debugging and changing "Enable JavaScript debugging for ASP.NET".
However, opposite to O.H. and like user2728841, my option was deselected, and selecting it solved the problem.

IIS Express Internet Explorer cannot display the webpage ... until restart

I have one asp.net application which I debug locally using IIS Express.
I have a setup by which I access it as http//machine-name:port/appname (instead of localhost).
This works smoothly until suddenly out of the blue during debugging I get the message:
Internet Explorer cannot display the webpage
What ever I do, it does not work again until I restart Windows.
Has anyone faced this issue before? Is there a way to fix this without restarting Windows?
I am using Windows 7 with Visual Studio 2010, but this also happens in VS 2012.
EDIT This issue stopped occurring. which leads me to believe this was Microsoft bug which they fixed in one of their updates
Just taking a stab in the dark, since you aren't getting any responses... Try deleting (or even just rename) the applicationHost.config under "My Documents\IISExpress\config", then open VS.net and run your project again. A new IISExpress config file will get generated for you. I have had mine junked up with something in the past, and starting fresh with a new one fixed whatever it was.
I have faced the same issue in a perticular scenario.
It was like, Page_Load event of 1st page contains code to redirect response to 2nd page and Page_Load event of 2nd page contains code to redirect response back to 1st page.
So due to this browser response fell into infinite loop and it shows message: "Internet Explorer cannot display the webpage".
So I'll suggest you to check the response redirection logic which may be causing problem.
If you work with a DI framework like Ninject and you are doing changes on your services dependencies, beware not to generate a circular dependency. When starting up the application you might get this same error.

Visual Studio 2008 Solution Explorer going crazy when trying to run

I am attempting to run a web project in vs2008, however it just hangs before launching the ASP.NET development server.
The vertical scroll bar in the solution explorer starts moving up as if lots of new items are appearing (like when the script documents node is filled) and then moves back to the bottom and then moves up again.
I can run the project if I right click on an aspx page and 'View in Browser'.
Anyone had a similar issue?
Thanks
There are few weird bugs comes free with each edition of VS. Dont worry about that. Instead directly running from Development Server, use local IIS hosting. Sometimes because of CSS issues, gets embeded when you switch betch Design and Source windows. Still MS is fixing those bugs. But I can suggest, go your own way...

w3wp crashes when starting debug in VS 2005

I know there were a couple similar questions, but none solved my problem.
This issue just started within the last couple of days. I don't always hit VS everyday, so I can't say for sure when it began.
When I start debugging, the app loads in IE, but the w3wp process dies with the message
"The program '[9252] w3wp.exe:
Managed' has exited with code 0
(0x0)."
I'm running Vista and debugging on IIS 7 (local machine). VS 2005. This is not a new environment. Everything had worked for months before this issue began.
I've Googled and found a number of solutions. I tried messing with the Process Model settings in the app pool. I tried changing the app pool. I've dug through all the settings of VS I could find that seemed applicable. I am running as administrator. Also, I run VS 2008 as well, and that is working fine.
Update: I tested another app and also had a problem. Though that app was configured to debug on the native VS web server (I forget what it's called off the top of my head), so the error is
The program [7192]
'WebDev.WebServer.EXE: Managed' has
exited with code 0 (0x0).
After about 8 hours of wasted time, I can answer my own question. It's an issue with VS2005/IE8. They, for whatever reason, do not play nice together. I uninstalled IE8 and everything is working fine.
I know Microsoft is a big company, but some interdepartmental communication and testing would be awesome.
I was having this same problem.
According to this Microsoft list of Visual Studio 2005 issues on Microsoft Vista, there are two requirements to fix this issue:
Start Visual Studio with Elevated Administrator Permissions
Make sure that the IIS 6 Compatibility Layer for IIS 7 is installed
The IIS 6 Compatibility components can be added by going to the Control Panel, selecting Programs and Features, and clicking Turn Windows features on or off. Make sure to check the IIS 6 Management Compatibility components under Internet Information Services.
Once I installed these components and rebooted I was able to debug.
EDIT: I still find that the process dies on my from time to time if I have other Internet Explorer browser windows open. Therefore, I have to make sure that the only Internet Explorer window that is open is the one that is debugging my Visual Studio 2005 code. I use FireFox to browse the web in parrallel if I need to.
This can happen if a stack overflow (no pun intended) occurs in your application. Stack overflows are usually caused by infinite recursion in your code.
I had the same problem since an update from latest weeks.
But solved by simply open the develompment tools and set the browser mode to ie7.
I get this if I have an existing IE window open when I start the debugger. Make sure you close all existing IE windows.
Using IE1 and VS 2003 (!) on Win 7 Enterprise N, I found that having additional IEs running made debugging impossible, but when starting the debug session after losing all IE windows worked.
Cost a lot of time and frustration.
I solved the issue on mine, by doing the following:
Go to IIS.
Go to Application Pools.
Click Advanced Settings on the relevant App Pool.
Find the key "Ide Time-out Action" and increase the value to something you think is right for you.

Resources