Is it true that ASP.NET MVC Browser link does not work for https (SSL) url?
Asked Answered
K

6

11

I am trying the Browserlink feature of ASP.NET MVC 5 and everything works great for non SSL pages. But if I navigate to a SSL page (with https url), I see 0 connections in the Browser link dashboard. So, is it true that Browser link works only for non SSL urls ? Or am I am missing any settings which will allow me to get Browser Link connection for both SSL and Non SSL urls ?

(I am testing from IIS)

Kopeisk answered 13/4, 2014 at 23:20 Comment(0)
Q
25

According to this link, Microsoft is working on it.

I have been able to get around the issue by following these steps (using Chrome):

  1. When the debugger opens the browser, open the F12 tools.
  2. Go to the Console tab.
  3. There should be an error message that looks something like this: GET https://localhost:[port]/[guid]/browserLink net::ERR_INSECURE_RESPONSE
  4. Open the link in a new tab.
  5. Click Proceed anyway.
  6. Close the Browser Link tab.
  7. Reload the tab with your app.

Browser Link should then start working.

Qualifier answered 25/4, 2014 at 17:2 Comment(2)
This worked (sort of) for me in VS2019. However, now BrowserLink fails with "WebSocket is closed before the connection is established." as described here: #21553866Tripura
The source link is no longer available.Mariettamariette
O
2

I've also worked around it by getting the script link, reducing it to the root, and browsing there. Once there, accept the cert warning then view the cert and install it into the trusted roots. From then on, the cert will be trusted and the script will load automatically.

Openhearted answered 16/6, 2014 at 20:2 Comment(0)
E
1

I was unable to get Browser Link, Web Essentials, to work with SSL, even with the mentioned remedies. I was able to find a way, however, to get it work for me.

I am running my app through IIS (not express) and my app was nested under the default website. When debugging the site I saw that Chrome was dumping a connection error with a URL using port 44399. Adding a binding for this port, for https, then allowed the connection to be successful. I also used a local development cert for the SSL Certificate.

DISCLAIMER: Visual Studio tries to be your buddy and not use ports that you've bound to in IIS so once you close and re-open Visual Studio it will likely not use the 44399 port anymore. It looks like it decrements until it finds the next available port. So assuming you're not using 44398 this will be your number. Once you unbind 44399, then close and re-open Visual Studio it will likely rebind to 44399 again.

Hopefully this helps some of you out.

Elative answered 30/8, 2014 at 2:16 Comment(0)
D
1

It appears that this limitation has been removed in Visual Studio 2015. I do not see any mention of this in the release notes, but Browser Link is fully operational in my dev environment under SSL.

Daphinedaphna answered 4/8, 2015 at 14:8 Comment(0)
M
0

I had a similar issue involving custom domains and subdomains on IIS Express over HTTPS.
(Using SSL certificate I self-signed with support for localhost and my custom domain, installed with self-signed root authority in the trusted certificate store)

I had got IISEx to use the certificate and serve it on port 443 (as admin user), but browserlink was failing with CONNECTION_RESET.
This persisted even after switching back to using localhost as the website url for IIS etc.
Turns out I had forgotten to replace the certificate associated with the other ports IIS Express uses (specifically port 44399), which were still associated with the default development certificate used by IIS Express

http://www.iis.net/learn/extensions/using-iis-express/handling-url-binding-failures-in-iis-express

http://benjii.me/2014/11/run-iis-express-on-port-443-using-ssl-and-wildcard-subdomains/
[Simple Guide but missing the delete existing certificate bindings guidance]

Mathison answered 10/7, 2015 at 12:51 Comment(0)
C
-1

For Windows 10 IIS Express users.

In visual studio click "View in Browser" in Browser Link Dashboard .

view in browser

An IIS Express icon will appear in system tray.

iisicon

Right Click the IIS Express icon.Your application should be listed in both HTTP and HTTPS.

httpslink

Hope it helps.

Clavichord answered 15/9, 2022 at 7:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.