简体   繁体   English

如何通过wifi访问Azure存储模拟器(本地)?

[英]How to access Azure Storage Emulator (Local) over wifi?

I am following the information in this documentation to access azure storage emulator (locally) 我按照本文档中的信息访问azure存储模拟器(本地)

http://msdn.microsoft.com/en-us/library/azure/hh403989.aspx http://msdn.microsoft.com/en-us/library/azure/hh403989.aspx

In the storage emulator, because the local computer does not perform domain name resolution, the account name is part of the URI path. 在存储模拟器中,由于本地计算机不执行域名解析,因此帐户名称是URI路径的一部分。 The URI scheme for a resource running in the storage emulator follows this format: 存储模拟器中运行的资源的URI方案遵循以下格式:

http://<local-machine-address>:<port>/<account-name>/<resource-path>

The following format is used for addressing resources running in the storage emulator: 以下格式用于寻址存储模拟器中运行的资源:

Blob Service: Blob服务:

http://127.0.0.1:10000/<account-name>/<resource-path>

Queue Service: 队列服务:

http://127.0.0.1:10001/<account-name>/<resource-path>

Table Service: 餐桌服务:

http://127.0.0.1:10002/<account-name>/<resource-path>

For example, the following address might be used for accessing a blob in the storage emulator: 例如,以下地址可能用于访问存储模拟器中的blob:

http://127.0.0.1:10000/myaccount/mycontainer/myblob.txt

It works fine if I try to access it from anything running on my computer, for example a local IIS server etc, that's because it has access to 127.0.0.1 on the pc 如果我尝试从我的计算机上运行的任何东西(例如本地IIS服务器等)访问它,它可以正常工作,因为它可以访问PC上的127.0.0.1

But what if I try to access it from an mobile device on the same wifi network ? 但是如果我尝试从同一个wifi网络上的移动设备访问它呢?

I can access local IIS servers from a mobile device by going to applicationhost.config and binding the local IIS server to the computer LAN IP for example 192.168.1.5 etc 我可以通过访问applicationhost.config并将本地IIS服务器绑定到计算机LAN IP(例如192.168.1.5等),从移动设备访问本地IIS服务器

Any idea how can I do this binding for the azure storage emulator ? 任何想法如何为天蓝色存储模拟器进行此绑定? ie how do I expose it to the LAN ? 即如何将其暴露给局域网?

Thanks 谢谢

The local emulation services were not intended for remote access. 本地仿真服务不适用于远程访问。 I do recall reports of folks setting up "loop back" connections to help enable this. 我记得人们设置“回送”连接的报告,以帮助实现这一点。 But IMHO, in most cases its almost easier and more cost affective to simply run the services in the cloud. 但是恕我直言,在大多数情况下,简单地在云中运行服务几乎更容易和更具成本效益。 This also helps avoid any issues with differences between cloud and on-premises. 这也有助于避免云与内部部署之间存在差异的任何问题。

If we look at doing mobile device development... You could easily spend several hours trying to properly set up the loopback. 如果我们看一下移动设备的开发......你可能很容易花几个小时试图正确设置环回。 If we put a price on this... say $25/hr.. and we spent 3 hours setting it up. 如果我们为此付出代价...说25美元/小时..我们花了3个小时来设置它。 So we just spent $75 to build that out. 所以我们只花了75美元来构建它。 By comparison, we likely could have used that same $75 to do our dev against a cloud storage account for the better part of a year. 相比之下,我们可能会使用同样的75美元在一年中的大部分时间里对云存储帐户进行开发。

I also faced similar issue where I wanted to access the azure storage emulator from another linux host for development. 我还遇到了类似的问题,我想从另一个Linux主机访问azure存储模拟器进行开发。 I ended up installing a local proxy server on the windows host which forwards request to the emulator instance. 我最终在Windows主机上安装了一个本地代理服务器,它将请求转发给模拟器实例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM