使IIS Express支持其餘網絡客戶端訪問

今天嘗試利用Android客戶端Web瀏覽器訪問VS2012 IIS Express調試中的Web應用,發現這個IIS Express僅支持localhost主機名地址訪問。html

上網搜索找到解決方案,幾經嘗試最後結果以下:express

在\Users\YourName\My Documents\IISExpress\config\applicationhost.config文件中找到正在調試的Web應用的設置行:瀏覽器

< site  name="HengShen.Pts.Web" id="2">
     < application  path="/" applicationPool="Clr4IntegratedAppPool">
         < virtualDirectory  path="/" physicalPath="C:\Users\VMUser\Documents\Visual Studio 2012\Projects\PtsSolution\HengShen.Pts.Web" />
     </ application >
     < bindings >
         < binding  protocol="http" bindingInformation="*:40000:localhost" />
     </ bindings >
</ site >

將倒數3行的localhost刪掉,冒號要保留。安全

而後,關閉這臺電腦的防火牆(我是在VMWare Fusion虛擬機中作開發,關閉防火牆對安全沒啥影響。)app

或者對防火牆作相應設置,能夠參考下面的網址:post

http://johan.driessen.se/posts/Accessing-an-IIS-Express-site-from-a-remote-computerspa

http://stackoverflow.com/questions/4866547/binding-iis-express-to-an-ip-address調試

 

>>>>> 版權沒有 >>>>> 歡迎轉載 >>>>> 原文地址 >>>>> http://www.cnblogs.com/jlzhou >>>>> 雄鷹在雞窩裏長大,就會失去飛翔的本領,野狼在羊羣裏成長,也會愛上羊而喪失狼性。人生的奧妙就在於與人相處。生活的美好則在於送人玫瑰。和聰明的人在一塊兒,你纔會更加睿智。和優秀的人在一塊兒,你纔會出類拔萃。因此,你是誰並不重要,重要的是,你和誰在一塊兒。
相關文章
相關標籤/搜索