Setting up IIS Express to accept local connections

2019-08-29 07:48发布

问题:

I made a web service with MVC4 and running on localhost with IIS express seems fine.
But I need to access from outside, so I'll have to use a local IP.

I've found out that IIS Express only accepts incoming requests with localhost specification in the header.

I've tried to go to the "applicationhost.config" and change the

binding protocol="http" bindingInformation="*:4019:localhost"

to this:

 binding protocol="http" bindingInformation="*:4019:10.250.38.85"      

but now visual studio wont let me run IIS Express saying its unable to launch.

I've also been wandering around IIS manager trying to attach one of the websites to the project without success.

What am I forgetting?

I'll also need this to use SSL and not sure how to configure

I've tried to edit IIS Express applicationhost.config and change binding protocol="http" to https but then vs2012 couldnt even load the project saying it couldnt create the virtual directory

Is there a way to change IIS express to normal IIS 7 so I can use the manager?

回答1:

You can assign IP in the iis as follows:

Then you need to publish your website into this iis website. it will work....