Accessing a local Azure app from a Virtual PC for cross browser testing

余生长醉 提交于 2019-12-31 04:43:09

问题


I'm using version 1.6 of the Windows Azure SDK. As I understand it, the emulated load balancer listens on 127.0.0.1 and the instances of the web apps are created at 127.255.0.[0,1...].

I need to do cross browser testing as I develop, so I created a load of Virtual machines via Virtual PC and Oracle VirtualBox with different browser configs. Unfortunately, I don't seem to be able to access the emulated load balancer nor the separate instances from any of the virtual machines as everything is bound to loopback addresses.

Does anyone have any ideas how I can do this? thanks!


回答1:


Hm, I have not tested exactly your scenario, but it should work as I used similar approach for other types of tests. So here is the possible solution:

  1. Download the AnalogX PortMapper.
  2. Configure it, so that it maps (forwards) port 81 to localhost using "any interface" and TCP protocol (check the screenshot for steps how to configure it).
  3. Exit the portmapper!
  4. Run your azure emulator
  5. Now run the portmapper
  6. You shall be able to access it from any VM.

Configuration steps:

Note: It is very important that you shut down the portmapper before you run your Azure Emulator deployment, and start it after the deployment is complete. This is because when running PortMapper will try to get port 81 on all network interfaces (including the loopback). That would force the Azure Emulator to jump to port 82 instead.




回答2:


Try to add more mappings to your IIS application.. + you need to have a loopback adapter configured at your virtual machine.




回答3:


Actually the easiest solution is to use PJS PassPort.

http://sourceforge.net/projects/pjs-passport/

Very easy. Just need to remember to run it as administrator.




回答4:


On Windows 7 the current "hack," AFAIK, is to go to (assuming default directory structure here):

C:\Program Files\Microsoft SDKs\Windows Azure\Emulator\devfabric

and edit both:

IISConfigurator.exe.config
IISConfigurator.exe.express.config

and modify /configuration/appSettings to include an item obviously replace "YOUR IP ADDRESS HERE" with your actual IP address such as 192.168.1.71. Here is an example:

<!-- these settings are for the devfabric scenario -->
  <appSettings>
    <add key="SetupCloudDriveDevPath" value="true"/>
    <add key="SetupMachineKeys" value="false"/>
    <add key="FixedSiteBindingIpAddress" value="192.168.1.71"/>
  </appSettings>

The debugger will still open to the origin 127.0.0.1:8* location but just replace 127.0.0.1 with your local IP address. Also, you will likely have to restart Windows 7 to get these changes to take effect and you want to edit the config files as administrator as they are protected.



来源:https://stackoverflow.com/questions/9003219/accessing-a-local-azure-app-from-a-virtual-pc-for-cross-browser-testing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!