3

I'm using Visual Studio and IIS Express to run a web app locally. I can access the web app without any issues using https://localhost:44300.

Out of curiosity, I wanted to access it using the IP address, so I tried https://10.1.1.229:44300 but am getting this error:

enter image description here

I thought I could replace localhost with my private IP address which I got from ipconfig: enter image description here

I also noticed it says the certificate is not secure.

How can I access my local web app using the IP address?

1
  • That's not a surprise. By default, VS only generates a site on IIS Express and bind to localhost, so you cannot use IP address. That's how IIS site bindings work, docs.jexusmanager.com/tutorials/… Modifying the bindings is not recommended as you are only debugging locally. To test a site with production settings, publish to full IIS and manage the settings there. Commented Feb 27, 2022 at 4:54

1 Answer 1

2

You can try the following settings to ~\Documents\IISExpress\config\applicationhost.config' file.

<binding protocol="http" bindingInformation="ip address:port:host header" />
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.