Azure计算模拟器:是否有可能控制单个实例的IP? [英] Azure Compute Emulator: Is it possible to control the IP of individual instances?

查看:130
本文介绍了Azure计算模拟器:是否有可能控制单个实例的IP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在2012年6月的Azure SDK时,Visual Studio 2010和IIS防爆preSS的工作,我已经在127.255.0.2上运行的Web应用程序。我使用ACS进行身份验证,以及我的应用程序配置为在此IP依赖方。我添加了一个新的工作角色,我的解决方案出于某种原因,这已经把我的web应用程序的IP回127.255.0.3。这是第三次在该解决方案已经改变了这个IP改变了其他地方,而我越来越无需添加新的依赖方设置和有点累了重新运行STS向导。

Working with the June 2012 Azure SDK, Visual Studio 2010, and IIS Express, I have a web application which has been running on 127.255.0.2. I'm using ACS for authentication, and my app is configured as a relying party at this IP. I've added a new worker role to my solution and for some reason this has pushed my web app's IP back to 127.255.0.3. This is the third time changes elsewhere in the solution have changed this IP, and I'm getting a little tired of having to add new relying party settings and re-run the STS wizard.

有没有控制任何正式的方式仿效哪个角色绑定到哪个IP?如果没有,则是启动的/绑定一样的角色文件夹中的项目次序的顺序,这样的话会打电话给我的Web角色像土豚确保它总是第一个绑定?

Is there any formal way to control which emulated role binds to which IP? And if there isn't, then is the order of startup/binding the same as the order of projects in the Roles folder, and if so then would calling my web role something like Aardvark ensure it was always first to bind?

推荐答案

为什么要更改IP地址?这是仅在内部使用,以避免IP /端口冲突。你的所有角色都只能通过127.0.0.1:[port访问],这是你应该为你的依赖方的应用程序的基地址使用的地址。该127.255.0.XX地址是生活在计算仿真的仿真负载平衡器后面的内部地址。

Why would you want to change that IP Address? This is used only internally to avoid IP/Port conflicts. All your roles are only accessed via 127.0.0.1:[port] and this is the address you should use as base address of your relying party app. The 127.255.0.XX addresses are internal addresses that live behind the emulated Load Balancer of the Compute Emulator.

有就是控制实例的用于计算仿真实例/角色IP地址没有正式的,也没有非正式的方式。另外,即使有办法做到这一点,我不会建议使用它!

There is no formal, nor informal way to control the instance's IP Address of instance / role for Compute Emulator. Plus even if there was a way to do that, I would not suggest to use it!

您总是可以得到正确的IP地址和任何端点的港口通过<一个云服务配置href=\"http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.serviceruntime.roleenvironment.currentroleinstance.aspx\"相对=nofollow> RoleEnvironment.CurrentRoleInstance.InstanceEndpoints 属性。

You can always get the correct IP Address and Port of any Endpoint configured in your cloud service via the RoleEnvironment.CurrentRoleInstance.InstanceEndpoints property.

阅读 IP地址和端口分配这里

更新

虽然您的应用程序在IIS防爆preSS势必127.255.0.XX(仿真直接IP地址,又名DIP),为您的应用程序的实际调用应通过127.0.0.1:81(仿真虚拟IP去地址,又名VIP)(其中只有端口更改)。这是在Visual Studio中启动您的应用默认加载页面。开发面料(又名计算仿真)已模拟负载平衡器,它监听127.0.0.1:81(仿真VIP)和重定向traffinc到合适的情况下,这是正穿过127.255.0.XX $ P $垫(仿真DIP) 。
这就是为什么你必须总是使用127.0.0.1与计算模拟器的工作和配置ACS依赖方时,时。你还有什么做的是错的,而不是重新presenting Azure的环境。

Although your app is bound to 127.255.0.XX (emulated Direct IP Address, a.k.a. DIP) in the IIS Express, the actual call to your app shall go through 127.0.0.1:81 (emulated Virtual IP Address, a.k.a. VIP) (where only port changes). And this is default load page when Visual Studio launches your app. The development Fabric (a.k.a. Compute Emulator) has emulated Load Balancer, which listens on 127.0.0.1:81 (emulated VIP) and redirects traffinc to the appropriate instances, which are spread across 127.255.0.XX (emulated DIP). That's why you have to always use 127.0.0.1 when working with compute emulator and when Configuring ACS relying party. Anything else you do is wrong and not representing Azure environment.

您可以通过这个读博客条目了解reminology和网络withing Windows Azure的。

You can read through this and that blog entries to understand the reminology and networking withing Windows Azure.

这篇关于Azure计算模拟器:是否有可能控制单个实例的IP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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