visual web developer Web service on debug HTTP/1.1 400 Bad Request

青春壹個敷衍的年華 提交于 2019-12-01 17:45:26
Bas van Dijk

According to Cannot connect ASP.NET development server (VS2010) via IP address

The ASP.NET Development Server will serve pages to browser requests on the local computer. It will not serve pages to another computer. Additionally, it will not serve files that are outside of the application scope. The ASP.NET Development Server provides an efficient way to test pages locally before you publish the pages to a production server running IIS.

For Visual Studio 2010 I always used inetd which is a port forwarding tool. Since Visual Studio 2012 I have this problem as well. The problem is that only localhost calls are allowed in the development server, even proxy calls don't work unless you change the request headers. I have made some modifications to an existing simple proxy server which I found on GitHub. It changes the IP address in the request url to`localhost. Download the code here.


I found a better solution. When you have IIS Express installed on your computer create a new application in IIS of the directory of your project and give it an alias. Note the right application pool is set and you will be able to browse your site via http://localhost/YourProject/ When you cannot connect from other computers it's probably a firewall problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!