Search code examples
google-chromeiisiis-expressvisual-studio-2017

Not authenticated chrome instance when running an app using IIS Express in VS 2017 (client side debugging feature)


It looks like the behavior when running an application with IIS Express changed.

In VS 2015, when i use IIS Express i get a new tab in my current instance of Google Chrome if i have one, otherwise i get a new instance with one tab, but the instance is authenticated:

VS2015

In VS 2017 RC, when i use IIS Express i get a new not-authenticated instance (no matter if i have another chrome instances):

VS2017

P.S: Disregard that there are two different applications, that is happening with all apps.

Later Edit: This is happening in 7 March release too. Answer adjusted. It is a new default feature.


Solution

  • You can encounter same problem when you're running VS 2017 RC as an Administrator. That won't change a thing in this scenario.

    It looks like this issue was already addressed: https://developercommunity.visualstudio.com/content/problem/2831/vs-2017-rc1-debugging-aspnet-project-with-chrome-d.html and it will be resolved by a future release.

    As per Robert McKee (Debugging ASP.NET project with Chrome doesn't sign you in with your Google account):

    It's happening because it is getting launched with the following command line: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --no-first-run --no-default-browser-check "--user-data-dir=C:\Users\rmckee\AppData\Local\Temp\chromeVSProfile\4020adf9-2540-4236-bad8-e8f3b6e23e4e" "data:text/html;charset=utf-8,%3Chead%3E%3C/head%3E%3Cbody%3EPlease%20wait%20while%20we%20attach%3C/body%3E%3C!--4020adf9-2540-4236-bad8-e8f3b6e23e4e--%3E" --remote-debugging-port=50384" so it is launching with a different profile.

    Realease edit: This behavior is related to the possibility to to client-side debugging in VS 2017. To return to old behavior just uncheck javascript debugging for ASP.NET.

    JS Debug .NET

    More here: https://blogs.msdn.microsoft.com/webdev/2016/11/21/client-side-debugging-of-asp-net-projects-in-google-chrome/