Visual Studio Browser Link not working in Firefox - visual-studio

I'm using Visual Studio 2015 and Browser Link doesn't work with Firefox.
IE and Chrome work perfectly with Browser Link.
Just got a new machine, but that didn't help either.
I tried the prerequisites mentioned in the browserlink dashboard (for static files, enable debugging) and I use IIS express, so .NET 4.0 is there.
Are there any more settings needed in Firefox?
In the network view, I just don't receive a response from the server, 0 bytes transferred.
Network trace:

Found it, the main website was running on 44300, browserlink seems to run on 44399 (although that port isn't visible in IIS express)
Browse to https://localhost:44399 gave me the Firefox "This Connection is Untrusted" screen, where I needed to trust("confirm security exception") the self signed IIS certificate (just like what I had done on the https://localhost:44300 site)
So it seems Firefox remembers trusted certificates per port number, not per DNS/IP/Name like IE and Chrome seem to do.
Now the browserlink is working and downloading the files.

I don't have IIS running locally, but ran into a similar problem running the app locally with Visual Studio 2019.
The suggestion by Erik fixed the problem for me as well. Browsing to https://localhost:44399/ and accepting the certificate worked in Firefox Developer.
Some more details from Microsoft regarding self-signed certificates:
https://learn.microsoft.com/en-us/iis/extensions/using-iis-express/handling-url-binding-failures-in-iis-express

Related

The site can’t be reached after adding Identity Server authentication

I created a program with Visual Studio 2019 in Windows 10 Pro Build 19042.630 by Secure an ASP.NET Core Blazor WebAssembly hosted app with Identity Server, without applying any changes to the default template. I pressed F5 or Ctrl+F5 but browser did not show the home page in localhost and said This site can’t be reached ERR_CONNECTION_REFUSED. In debug tab SSL was Enable, but after I disabled it the home page rendered. Now I need SSL for Security, Identity Server and Can not work..
These solutions did not help me
Visual Studio not debugging
Enable SSL in Visual Studio - not prompted to install certificate
https://www.hanselman.com/blog/working-with-ssl-at-development-time-is-easier-with-iisexpress
https://www.pluralsight.com/guides/visual-studio-2017-resolving-ssl-tls-connections-problems-with-iis-express
Thanks a lot for your suggestions....
By formating windows drive and installing windows and visual studio it finally worked.

VS2019 install with SQL Server components causes err_connection_reset when viewing the web

I installed Visual Studio 2019 last night with SQL Server components, and now whenever I try to view web pages in Chrome, I get a connection reset error. I assume it has something to do with IIS. I tried uninstalling IIS Express, but that didn’t seem to help. I checked all my connections and everything seems to be fine. I can ping google in the command line, but for some reason I just can’t view the web. Does anyone have any ideas?
Maybe your services are turned off, try entering the task manager with CTRL + ALT + DELETE, and look for SERVICES, the SQL SERVER server you are using, and check if it is stopped.
VS2019 install with SQL Server components causes err_connection_reset
when viewing the web
This is not expected behavior after VS installation. Maybe something in that installing process modified your IE settings.
Try resetting all IE options(IE options=>Advanced=>Reset) and reinstall Chrome browser.
I fixed this by removing all Visual studio installations and reinstalling VS 2019.

IIS Express not serving static files to Firefox

I'm using Visual Studio 2013 with IIS Express 8 to develop an application for a local Intranet. This application was built using ASP.NET MVC 4 in Visual Studio 2012 and later migrated to 2013. I had been using Visual Studio Development Server until I migrated to VS2013 with no issues.
After the migration, the application compiles, runs and authenticates fine, but it's not serving Static Files - it just returns an HTTP 500 response with no further details. See image below:
This also happens to Images and CSS files.
What can I check to solve this? Any suggestions?
UPDATE:
The application works fine in Local IIS (version 8).
It works in IIS Express on other PCs.
UPDATE 2:
After further testing, I found out that this only happens to Mozilla Firefox (it works fine in Internet Explorer and Google Chrome) - I didn't notice before because I always use FF. Currently using version 29.
Any ideas?
Finally! I was able to solve this issue with the help of this question.
This was happening because Firefox by default has Windows Integrated Authentication turned off. It doesn't make any sense to me why it works fine in regular IIS or in dynamic files (controller actions, WebApi, etc.), but that's a mystery for another day.
To enable Windows Integrated Authentication I followed this steps:
Type about:config in Firefox's address bar (nav bar)
Search for network.automatic-ntlm-auth.trusted-uris
Double click on network.automatic-ntlm-auth.trusted-uris
Add http://localhost to the list (paste that if it's empty)
After that I just hit F5 in Firefox and everything worked as expected.
This issue is poorly documented, so I wonder if nobody else uses Firefox with MVC to develop web applications using Windows Integrated Authentication?
Have you had a look at this ?
ASP.NET MVC application gives Internal Server Error only when viewed in Firefox
It doesn't explain why it works on IIS but there is a firefox doesn't support Integration Authentication out of the box.
The only thing that seems applicable to your situation is a problem with the install of IIS Express since this is an similar issue to something seen in previous IIS Express versions. I would either re-install it or see if your version of Windows can host IIS 8 in which you would just enable static content.
If this was just a matter of not having static content turned on or permissions for static content, you'd get a 404 or 401 error respectively. Hope this helps...
I'd look in the machine events viewer under application and system to see what the issue is.
Does the IIS serve anything up in the same folder such as .txt files, .html, jpg images?
It could possible be file or folder permission and/or the anonymous user being used to access them under IIS.
My first point would be event viewer though for more detailed information on the 500 error.

Debug website that requires client certificates in Visual Studio 2010

I have a website that is hosted using IIS7 when deployed, but we are seeing strange behavior with a web service we use that requires a client certificate. So what I'd like to do is debug our website locally to step through the code and take a closer look at the issue.
The problem is that I cannot figure out how to have the website accept client certificates when I'm running it locally (debugging it). If I just run it locally and perform an operation on the website that uses my client cert, it is clearly not pulling it from the browser because I'm getting "m_safeCertContext is an invalid handle" errors.
Is there a way to have the website accept client certificates when running locally? I have IIS7 installed on the same machine that has Visual Studio 2010 Professional installed, and the OS is Windows 7.
Thanks.

How to test SSL switching using VS2010 on Win7

I developed a large web application with VS2008 installed on an old Win2k3 server. I now have Visual Studio 2010 installed on Win7 Pro and work on the application fine.
Parts of my web application need to switch into and out of SSL which they did on the Win2k3 server using the IIS tool that creates a private SSL cert.
However I now need to make changes to those parts and now need to be able to test it on the VS2010 internal web server as I no longer have a dev web server like I used to. Is there any way I can do this or is it definitely a no no?
Please take a look here. It is mentioned:
This sample [some sample using HTTPS]
only works when hosted on IIS and
cannot work on Cassini – Visual Studio
Development Server because Cassini
does not support HTTPS.
As this sample is related to .Net Framework 4, I assume that Visual Studio 2010 does not support SSL.
EDIT: The good news is that you can enable SSL for IIS 7.0 (and above). You can find detailed instructions here.
When are done you should be able to access your website over SSL, but browsers will display a warning that says that your certificate is not trusted. However, this can be easily solved in the following way:
1) The common name (CN) for the self-signed certificate that you create for the website should match the computer name that runs IIS and you should access the site using the computer name (https://computerName/ not https://localhost/ or https://IP/)
2) Export the certificate from IIS and import it in the browsers certificate stores. For Internet Explorer the certificate must be added to Windows Certificate Store at Local Computer / Trusted Root Certification Authorities (use Windows Management Console). For other browsers, because they use custom certificate store, the certificate must be imported in their specific location. For example, in case of Firefox to import a certificate go to Tools->Option->Advanced->Encryption->View Certificates->Authorities->Import.
With the release of VS2010SP1 & IIS Express you can now to debug code that uses with https/SSL without having to use a FULL IIS server.

Resources