Change https back to http on Visual Studio for Mac - visual-studio

I recently had to reinstall my solution in Visual Studio for Mac. When I clicked run for the first time it asked for my system password to trust an SSL certificate. I clicked yes. Now the solution runs on localhost port 5001 instead of 5000 and is using https instead of http. I am now getting mixed content errors on my HttpRequests. How do I change it back to http and port 5000. This is Visual Studio Mac Community 8.6.5.

Ok so I just removed the reference to https://localhost:5001 in the ASP.Net Core run configuration found in Project Options and it was back to normal.

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.

IIS Express Remote access with Visual Studio 2019

I don't remeber this being an issue before, and many threads are rather outdated now.
On my Windows 10 installation VS 2019 hosts my project at http://localhost:58402 just fine.
However when I go to change the url under Properties > Debug > App URL to 0.0.0.0:58402 I get the error:
Cannot connect to web server IIS Express
What I have tried:
Running VS 2019 as admin
Restarting computer
Deleting hidden VS folder
Modifying launchSettings.json in my API project properties folder
I can change the port just fine. But as soon as I change localhost to 0.0.0.0 the error occurs.
Update:
I have been using the NPM package iisexpress-proxy with great success now as a daily driver for 5 months now.
Had some difficulty with CORS, but disabling that for local debugging allows me to do everything I would expect.
https://www.npmjs.com/package/iisexpress-proxy

Resolving Host in remotebuild on Visual Studio

Went to Tools --> Options --> Tools for Apache Cordova --> iOS Configuration in Visual Studio on my Windows machine.
On my Mac Machine I ran remotebuild certificates generate and got back:
Enable remote iOS processing: True
Host: hostname
Port: 3000
Secure mode: True
Security PIN: 000000
(I replaced host and pin such that this question may be useful to others in the future).
In Visual Studio on my Windows machine I filled in my hostname, secure mode, pin, etc according to the remotebuild certificates above. I have also tried replacing hostname with my mac IP address.
I am getting the message The host hostname could not be resolved. However, when I go to my Mac machine and do localhost:3000 I get a page saying
Remote build Express server open for business on port 3000
and on my terminal, the server responds with GET / 304 2.185 ms - -, so I know the server is active. What is the solution to fixing this on the Visual Studio side?
I found the solution : turns out my computers were on two different WiFi networks..

Chrome/Windows: Connection refused when I use my IP address

I have an ASP.NET server running under VS2010 on my PC (Win7) on port 12345.
When I load localhost:12345 in Chrome, my default page loads perfectly.
But when I load 192.168.128.104:12345 (by my internal IP, not by localhost) I get "connection refused".
Exact same behavior when I try to access the server from another device on my intranet (in my case, a Raspberry Pi)
I realize that when I hit localhost that I'm just looping back in my adapter, thus the request never leaves my machine. So it would seem that the cause is due to the request leaving & re-entering my machine.
I've create custom Inbound & Outbound rules in my Windows Firewall to allow port 12345, but to no avail.
Any ideas would be appreciated.
I found the answer here:
Can I access ASP.NET Development server in an intranet?
which led me to this:
http://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/UseFiddlerAsReverseProxy
As is so often the case, finding the answer is hugely dependent upon using the correct search terms. Here the critical keywords were "asp.net debug intranet"
The 'right way' here is to use IIS Express and you don't need fiddler to act as a reverse proxy. Its a hack that was used to work around using Cassini - a low budge web server that is outdated (and doesn't compare to IIS Express) and used with VS2010 prior to SP1.
In VS2010 SP1, IIS Express support was added. You can read about that here:
http://blogs.msdn.com/b/webdev/archive/2011/03/14/enabling-iis-express-support-in-vs-2010-sp1.aspx
IIS Express can handle this just fine - and Visual Studio 2010 integrates with it. Its not one or the other - you develop with Visual Studio and when you launch your app it launches it with 2010.
If you want something really easy, install Visual Studio 2015 Community Edition, use ASP.NET 5 (now called ASP.NET Core 1) and simply run it to self host via the play button looking drop down you are used to seeing in VS 2010- no web server required.
Again - being that its 2016 - what you cited is a very old way. If its a quick hack, I can understand that - but if you are looking for the best practice way going forward, use IIS Express (and ideally a newer version of Visual Studio - we have them for free in the 2013/2015 Community Editions)
Hope that helps!

How do I get IIS Express to work in Windows 8?

So I've been working at this for about 2 days now and have essentially hit a dead end. I guess the first thing to know is, can IIS Express work in combination with Visual Studio 2010 and Windows 8?
I just got this new laptop in, with Windows 8 pre-installed. I installed Visual Studio 2010 Ultimate, SP1, and MVC 3. I had to enabled .NET Framework 4.0 myself...
I have a project that I transferred from my old computer (windows 7) to this computer. It was set up to run on IIS Express. So when I opened the project, VS2010 said that I was missing some components and asked if I wanted to install them--so it installed IIS Express for me. When I try to run my project, I get a "This page can't be displayed" page in IE. In fiddler, I get
- 302 HTTP localhost:16683 /
- 502 HTTP Tunnel to localhost:443
the SSL URL for the project is https://localhost:44300/
the URL for the project is http://localhost:16683/
If I go to IISExpress in my system tray and select the https link there, it opens the website up just fine. If I select the http link there, it get that "502 HTTP Tunnel to localhost:443" line in fiddler again... Why is it trying to tunnel to localhost:443???
Another thing to note is that I decided to create a test MVC 3 project from scratch to see what IIS Express would do. I set the project to run on IIS without enabling SSL. When I run the project is starts up just fine. When I click the logon link, it tries to redirect to an https link with port 44300...when it shouldn't be. I created a test project for the same purpose on my windows 7 machine, and the project did not do this.
The last thing to note is that after going to the https link for my initial project via the IIS Express tray icon, if I click the logon link for the test project, it now takes me to my initial project's https link... It's as if the projects are crossing over into each other...

Resources