Can't access WEB API with ip:port but can with localhost:port during VS debug mode

后端 未结 5 1832
天涯浪人
天涯浪人 2020-12-08 02:45

I am trying to write an WEB API from .net and trying for my Android Application to query some data from the sql server database.

I have the web api written and it wo

5条回答
  •  情话喂你
    2020-12-08 03:06

    If you're running it in debug mode I assume you're using IIS-Express.

    By default, IIS-Express only binds to localhost.

    To circumvent this, you can open the IIS-Express application config file located at: C:\Users\\My Documents\IISExpress\config\applicationhost.config and modify the site's binding information.

    change

    
    

    to

    
    

    You'll also have to restart IIS-Express after the change.

提交回复
热议问题