我可以从浏览器或其他应用程序(如Windows窗体应用程序)连接到Web API应用程序,方法是:
http://localhost:28642/api/inventoryitems/GetAll...but如何使本地主机可供其他人(在同一网络上)使用,以便他们能够进行相同的REST调用?
只是他们连接到我的机器上,就像这样:
http://platypus:28642/api/inventoryitems/GetAll如果是的话,我要做什么才能使它可以访问(如果有的话)?
无论如何,我真的不想一直在我的机器上运行我的Web应用程序,所以:我如何设置它,使它能够24/7运行,而不用启动/照看它呢?
Azure网站是否是这方面的有效选择?
更新
可以(根据我所读到的这里)将applicationhost.config从以下内容中更改:
<site name="HandheldServer" id="20">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\HandheldServer\HandheldServer" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:28642:localhost" />
<binding protocol="http" bindingInformation="*:28642:platypus" />
<binding protocol="https" bindingInformation="*:44300:localhost" />
</bindings>
</site>...to这个:
<site name="HandheldServer" id="20">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\HandheldServer\HandheldServer" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:28642:localhost" />
<binding protocol="http" bindingInformation="*:28642:platypus" />
<binding protocol="http" bindingInformation="*:28642:" />
<binding protocol="http" bindingInformation=":28642:" />
<binding protocol="https" bindingInformation="*:44300:localhost" />
</bindings>
</site>...will使它可用(但是,我必须运行它,还是IISExpress会在后台启动它?)
据推测,第一个条目可能已经可用。我不知道是否有必要加上*,所以我有一个条目,有和没有。
发布于 2014-01-30 22:01:28
你可以选择:
没有奇迹;)
https://stackoverflow.com/questions/21468266
复制相似问题