Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS Express stops suddenly when I click on a text box in my web app

Using Visual Studio 2017 on Windows 10
My IIS Express has suddenly started to act strange and shut itself off without warning or error while I'm debugging my C# MVC Web App.

  • It doesn't open a new tab in an existing browser window (In my case, Firefox v60.0 (64-bit))
  • Stops the Visual Studio debugger and closes IIS Express:
    • When the tab/window closes
    • When the tab is merged into another browser's window
    • When I click on any text box at all in the web app
      • Even clicking the URL bar causes it to crash!

I have made no deliberate changes to my project settings and I don't see any pending changes in my Team Explorer source control. The only difference I think that has happened between now and when it last worked was that I downloaded a separate project that used IIS Local and required Admin rights to work correctly. More about this below.

Previously, IIS Express would run when I start the debugger in Visual Studio, open itself in a new tab on an existing Firefox browser or create a new one if none exist, and stop when I click the Stop icon in Visual Studio.

Things I've tried:

  • Running as Admin
  • Restarting Visual Studio
  • Restarting my machine
  • Getting latest version from source control before this started happening
  • Deleting the .vs folder in my ...\{Project Name}\ folder
  • Running in Chrome instead
    • Still opens a new window on run
    • Does not crash when clicking on a text box or the URL bar
    • Does stop when I close the tab or merge it into an existing Chrome browser

The only thing I think that might have caused this is that I downloaded a different project from our TFS Source Control that uses ISS Local, and when I tried to load that project into it's own solution I get an error saying:

The Web Application Project {project name} is configured to use IIS. Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine.

Opening Visual Studio as Admin loads that project into it's solution automatically.

  • It also opens a new browser window
  • It does not close when I click on a textbox in Firefox or Chrome, or merge it into an existing browser

Any ideas at all as to why this might be happening or how to fix it?

like image 278
Ryan Taite Avatar asked Dec 23 '22 07:12

Ryan Taite


1 Answers

I was having same Problem with Visual Studio (15.7.5) & Firefox Developer Edition (62.0b12). Every time i click any input or text field it just closes both Firefox and IIS without any error or exception.

What i've done to fix this issue is i Simply Uncheck the option:

Stop Debugger when browser window is closed

found under Tools > Options > Projects and Solutions > Web Projects

save, clean, Build & Start.

This one Fix my Problem!

like image 119
Arslan Ameer Avatar answered Dec 26 '22 06:12

Arslan Ameer