问题
I'm getting a 400 bad request error message when accessing an ASP.net web api via a url that uses the computer name. When I use localhost it works fine. I'm using the iisExpress for visual studio 2012.
Any help is appreciated! Thanks in advance!
回答1:
I found the answer to this from another post on here. I had to update my IISExpress' applicationhost.config file and add a binding with my computer name on it.
The link to the other post is here: Configure IIS Express for external access to VS2010 project
回答2:
If you prefer not to change configurations, you can use our free VS extension called Conveyor
https://marketplace.visualstudio.com/items?itemName=vs-publisher-1448185.ConveyorbyKeyoti
来源:https://stackoverflow.com/questions/17223404/400-bad-request-when-access-asp-net-web-api-via-computer-name-on-iisexpress