Android模拟器无法连接到IIS部署的站点 [英] Android emulator cannot connect to IIS deployed site

查看:667
本文介绍了Android模拟器无法连接到IIS部署的站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在IIS 7上部署了我的网站。我想使用Android模拟器在该网站上写的一些服务。如果我在本地运行该网站(使用Visual Studio),我可以通过Android模拟器连接到网站。但是我指定的地址为IIS部署的站点,它不能连接,因此抛出异常。任何想法如何摆脱这个问题?我必须在IIS中进行任何设置吗?

I have deployed my site on IIS 7. I want to consume some services written in that site by Android emulator. If I run that website locally (using Visual Studio), I can connect to site through Android emulator. But I specify address for IIS deployed site, it cannot connect thus throws an exception. Any ideas how to get rid of this problem? Do I have to make any settings in IIS?

推荐答案

在IIS Express applicationhost.config文件中添加系统的IP地址绑定部分。

add the IP address of your system within the IIS Express applicationhost.config file bindings sections.

<bindings>
<binding protocol="http" bindingInformation="*:40000:localhost" />
<binding protocol="http" bindingInformation="*:40000:192.168.5.118" />
</bindings>

替换为您自己的地址和港口。

Replace with your own address and port.

这篇关于Android模拟器无法连接到IIS部署的站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆