I was working happily on my project. Then came a need to enable access to the server from remote machine (android) in LAN. I followed few answers on StackOverflow and they have completely ruined my project.
How to enable external request in IIS Express?
IISExpress returns a 503 error from remote machines
localhost refused to connect Error in visual studio
Earlier when I used to Debug using Visual Studio, I used to see two URLs, but I now I only see one. The debugging used to start in https://localhost:44373 but now https is just not starting and I get connection refused when I browse the https link. http link works fine.
I even tried to reset by following methods,
Deleted .vs\<project>\config\applicationConfig
Deleted IIS configuration rmdir /s /q "%userprofile%\Documents\IISExpress"
but none helped i.e. https is not starting even after using doing this as well
IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:44373/ -UseSelfSigned
Please help. I am getting worried. My basic intent is to enable HTTPS and enable access to this https from remote machine.
If someone knows about good server where I can deploy website and easily do this, you may suggest as an alternative, but suggest a solution to current problem as well.
Close Visual Studio.
Following this link to Remove your IIS Development Certificate.
Now, Repair IIS from control panel.
Start Visual Studio. Things will start to work
Related
So, this is my first time diving into ASP.NET. I've programmed in C# before (Unity), but I've never made a ASP.NET app. The problem is, I can't seem to get SSL to work! When I create a new project using these steps, I get the following error:
However, it works perfectly fine when I go to Properties > Debug and uncheck "Enable SSL". I've also tried using Microsoft Edge, but it gives the same error. Here is what I have tried to fix this:
Disable my antivirus software (Kaspersky) and restart Chrome
Restart my computer
Delete the applicationhost.config file in the .vs folder (source)
Delete the .vs folder and run a command (more info here)
Run VS Studio as Administrator
Delete a domain security policy in Chrome (more info here)
Do netsh http show iplisten - nothing was listed (source)
Repair IIS (Control Panel > Programs & Features > Select IIS > Repair)
Check if the port # was in the correct range (source)
Make sure there is only one certificate for localhost (source)
Follow the steps here
Uninstall and re-install IIS
LITERALLY UNINSTALL AND REINSTALL ASP.NET
Run in incognito mode (Chrome)
As you can see, I've tried everything that has come to my mind. Could somebody please explain why this is happening? To re-iterate, this happens when I don't change any of the default code you get by following these steps, so it can't be a timeout or something.
I'm using IIS Express 10.0 (iisexpress_amd64_en-US.msi from here) with .NET Core 5.0 and Visual Studio 19. As of now, everything is up to date.
I really, really hope you guys can help me with this!!! I would want to use https (because, ofc, its more secure than http).
EDIT: I have tried using Firefox, and who would've guessed? It's the same error. (PR_CONNECT_RESET_ERROR)
I ran into the same issue on a fresh Windows 10 and VS2019 install, for me this solved it
https://improveandrepeat.com/2020/05/recreate-the-self-signed-https-certificate-for-localhost-in-iis-express/
In short
Open cmd with admin rights
Navigate to “C:\Program Files (x86)\IIS Express”
Run IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:PORT/ -UseSelfSigned changing PORT for the port you're trying to use.
I'm using Visual Studio 2017. I created a new asp.net mvc application. When I try to run the project on localhost, using (IIS Express (Google Chrome)), chrome gives me the following error:
This site can’t provide a secure connection localhost sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR
If I change the browser to debug using Internet Explorer it runs without issue.
Any help appreciated!
Thanks
Fixed. Because it was happening only to newly created solutions and not previous solutions and that I had ran a Visual Studio update that day I thought it was something weird going in related to that. In the end I just had to clear the SSL State in Internet Properties and it was fine after that.
I am receiving the error, "unable to start debugging on the web server. the debugger cannot connect to the remote computer. the debugger was unable to resolve the specified computer name" in visual studio. I have two websites already working in IIS, but can not get this third one to work.
I have tried an IIS reset and many other alternatives
The answer to my question was my host file was being saved in the wrong location.
I've created an asp.net 4.5 application in Visual studio 2017 however when I run it I get an message in chrome saying your internet access is blocked. I'm sure why this is happening and I'm struggling to find any resources online that fixes this issue.
Any suggestions would be appreciated!.
It appears that you are trying to run an SSL secured page on IIS Express using the non-secure IIS option.
To Fix this run your project and look at the taskbar system tray for the IIS express icon
Right click on that and you will see two options one with an http and one with https click on the https on and this should open the website properly
Are you in your home local network or in your company network? If in company your firewall can block website on the port or badly defined proxy.
I have a C# MVC project in Visual Studio Express 2013. I'm using the Publish Web option and Web Deploy as the method.
After a bunch of work to get Web Deploy setup on the target machine, I finally got a valid connection:
Screenshot here (since I don't have the reputation to add the image to the post): http://screencast.com/t/Q5IccavcB1
However, when I actually publish, I get this error:
Web deployment task failed. (Connected to the remote computer ("myServerName.com") using the specified process ("Web Management Service"), but could not verify the server’s certificate. If you trust the server, connect again and allow untrusted certificates.
The help information I find is almost exclusively for VS 2010, which isn't very helpful here. I finally tried adjusting my .pubxml file by directly adding AllowUntrustedCertificate = True in the PropertyGroup, but that has no effect.
Screenshot:
Any ideas? I'm out of them.
Thanks!
Well, it turns out that an artifact left over from trying to get an MSBuild for TeamCity working was the cause of the problem.
upgraded from VS2010 to VS2013 now I cannot publish
I added back in the PropertyGroup that I removed yesterday, and I was able to publish.
adding /p:AllowUntrustedCertificate=true argument in msbuild.exe resolve my problem
How can resolve Untrusted certificates Error ?( TFS2013 Build and deploy to IIS )