views:

1644

answers:

11

I use Visual Studio 2008 primarily for web development, and there's one annoying behaviour which seems to have occurred ever since I upgraded to IE8 on my work PC:

When I set a start page for a web site or web application project, and then either click the "Start Without Debugging" icon in the toolbar or use the keyboard shortcut CTRL-F5, Visual Studio proceeds to start IE8 (my default web browser), but does so twice:

The first new window that IE8 opens has a tab saying "Connecting...", and it loads the about:blank page. Then, another new IE8 window opens also with a tab saying "Connecting...", and loads the start page I set in my project.

This is very annoying. Does anybody have any ideas what might be causing this and how to fix it?

Before somebody suggests it, I have already been working around this for a while by having Firefox as my default browser ;-) But, I'd like to use Visual Studio's javascript debugging capabilities with IE8 and so want IE8 as my default again, for now.


Additional information:

Using Process Explorer, I can see that both of the iexplore.exe processes were launched by the same parent process, Visual Studio 2008's devenv.exe.

The first iexplore.exe process has the following command line:

"C:\Program Files\Internet Explorer\IEXPLORE.EXE" -noframemerging -debug about:blank

The second iexplore.exe process, launched a few seconds later, has the following command line:

"C:\Program Files\Internet Explorer\IEXPLORE.EXE" -noframemerging -suspended -debug http://localhost/test/index.html

Then, I also tried Process Monitor. In the log, I can see two distinct "Process Create" events from devenv.exe on "C:\Program Files\Internet Explorer\IEXPLORE.EXE" ... a few seconds apart.

Interestingly, if I try the exact same thing (launch without debugging) with Visual Studio 2005 (instead of 2008), I only see a single process created with a command line of:

"C:\Program Files\Internet Explorer\IEXPLORE.EXE" about:blank

With 2005, visually it appears as if about:blank gets loaded first, and then the URL gets loaded by that same browser process in the same tab as about:blank, overwriting it.

One other thing I notice different: In the VS2005 Process Monitor log, it shows a lot of reading of the file "C:\WINDOWS\system32\ieframe.dll", but the same doesn't show in the VS2008 Process Monitor log. (ieframe.dll contains the type library for some COM objects related to Internet Explorer.) So, the way VS2005 launches and controls IE could be different than what VS2008 does.

AND LAST, this is weird: In VS2008, if I click "Start Without Debugging", I get the two windows. But, if in Solution Explorer I instead right-click my web site project or any HTML file in it and choose "View in Browser", I get only the single window. Why the difference between "Start Without Debugging" and "View in Browser"?

+1  A: 

You are not the only one. I too have had the same annoying behavior with web applications and using asp.net development server. This started after installing vs2008 which also upgrades to IE8. I have resorted to setting debug=True in the config and just using F5. Of course, I have to remember to turn debug off when posting to the live site. If anyone has an answer please post. Thanks.

mharpen
A: 

I'm having the same problem. What is worse, I'm getting an intermittent error when starting WITH debugging. Very frustrating.

+2  A: 

Hrm... very odd. If you use SysInternal's Process Monitor, can you see if the second IE window was launched by the first, or if Visual Studio owns them both? That might help pinpoint where the problem lies.

Beyond that, next thing to try is disabling most browser addons, to see if that makes a difference. Lastly, try using Tools / Internet Options / Security to enable Protected Mode for the Intranet and Trusted Sites zones.

EricLaw -MSFT-
Thanks! I'll try these suggestions later this week when I'm back in the office, which is where I'm experiencing the problem.
Chris W. Rea
I added more info above on the ownership of the iexplore.exe processes, and what I discovered with Process Monitor. Also FWIW, I can't change Tools / Internet Options / Security... "Some settings are managed by your systems administrator." Will try disabling add-ons next.
Chris W. Rea
OK, so: I disabled ALL of my add-ons. Everything. VS2008 then started launching only one instance of IE. Yippee! So then I figured one add-on must be the culprit. I re-enabled everything one by one, but I couldn't find anything that would cause the original errant behaviour. I did notice I still had the IE Developer Toolbar installed, though -- it wouldn't let me "enable" it (I suppose since IE8 has Developer Tools built-in?) so I uninstalled it. So, thanks for the suggestion. +1. Not sure exactly what the problem was, though. A disappearing heisenbug! :-/
Chris W. Rea
Weird, glad it got sorted. (Incidentally, the old IE7 "DevToolbar" crashes in IE8, and hence is hard-blocked; that's why you couldn't enable it.)
EricLaw -MSFT-
I too have this problem; I am glad Slashdot exists!
Charles Prakash Dasari
This answer has been marked as correct, but it doesn't help at all. I'm experiencing the same issue when doing "view in broswer" a site from VS. Turning plugins off doesn't help :(
amartynov
Amartynov: What are your Protected Mode settings?
EricLaw -MSFT-
EricLaw -MSFT: Protected mode is on for all categories of sites. I run Windows 7 Enterprise, issue appears with VS 2005. Disabling plugins is not an option because we do need dev tools badly.
amartynov
@amartynov: What dev tools are you using? IE8 has built-in tools that aren't add-ons.
EricLaw -MSFT-
A: 

It might have to do with IE's "protected mode". Try turning it off. You can double click the "protected mode" text in the status bar to do that.

I've had the same problem and it's soooo annoying!

janzi
Didn't seem to be the problem, but thanks for the suggestion.
Chris W. Rea
A: 

It sounds as if Visual Studio is utilizing old behavior.

Specifically it seems as if Visual Studio is loading up about:blank to get the browser to open, and then loading the page via another call to the executable.

Try the following change: Open Internet Properties Click Tabs Settings Near the bottom there should be a section that says "Open links from other programs in:" Within that section select current tab or window

Guvante
Thanks for the suggestion. While my problem has gone away (see my comment in @EricLaw -MSFT-'s answer), I tried your suggestion to see if it would change the "about:blank" behavior. But, there was no change: Visual Studio still launched IE with the "about:blank" page and then had IE load the project's default page.
Chris W. Rea
@cwrea: My change wouldn't remove that behavior, it would fix the fact that the second page loaded in a different window. It seems as if VS is intentionally calling the about:blank page first, I do not know why, but I am glad your problem is fixed.
Guvante
+1  A: 

Thanks for pointing me to the add-on's. This behavior was very annoying indeed. On my computer it is disappearing only - and only then - when disabling the Windows Live Toolbar add-on. Enable the same add-on and the problem will reappear!

A: 

Comment deleted

Neil Burnett
A: 

We managed to resolve the issue by launching VS 2005 in Windows XP compatibility mode (shortcut settings).

amartynov
Bad news: compatibility mode brings issues with debugger :(
amartynov
+1  A: 

Sorry for the duplicate answer, but disabling Live toolbar is really working out great for me, I wanted to up the answer from sjerp but since I lack reputaion I thought it was worth while repeating it.

cjensen
+1  A: 

Disable Live toolbar when using IE8 and Microsoft Visual Web Developer 2008 Express Edition if you are getting two browser instances is indeed right

Rat1960