Windows Phone 8 emulator can't connect to the internet

后端 未结 14 2308
遥遥无期
遥遥无期 2020-11-28 06:47

I have Windows 8 installed inside of an emulator, and the new WP8 SDK installed on it. My problem is that the emulator can\'t connect to the internet. I don\'t have any prox

相关标签:
14条回答
  • 2020-11-28 06:56

    I think I've finally found the answer, but you're probably not going to like it. It would appear that the phone emulator requires you to have a second network adapter to dedicate to this purpose. Personally, I run Windows 8 in VMWare, and so a second network adapter is free for me.

    Anyway, after you get the second network adapter that you can dedicate for the phone emulator(must have internet)

    1. Start from scratch. Go to the Hyper-V manager and delete the emulator along with all of the virtual switches
    2. Start the emulator from Visual Studio; this will recreate it with all default settings(select yes you want to configure it to connect to the internet)
    3. Shut it down
    4. Now, go back to the Hyper-V manager
    5. Delete the snapshot that was just created for the emulator. This will prevent your changes from disappearing
    6. Find the virtual switch for your second network adapter in the Network Adapter settings(under control panel)
    7. Disable TCP/IPv4, 6 and all other services. This prevents your host machine from trying to use the connection. While you're there, get the MAC(Physical) address of this adapter
    8. Find the virtual-switch for your second network adapter under the Hyper-V settings for the emulator
    9. Change the MAC type to static and paste in the MAC address of the adapter
    10. Enable MAC spoofing (not sure if required, but just in case)
    11. Then, find your virtual switch under "Virtual Switch Manager".
    12. Ensure "Allow management operating system to share this network adapter" is unchecked and that all extensions are disabled
    13. Click OK and then start the emulator from Visual Studio!

    Basically, it appears that for some odd reason it won't properly work unless the phone has the same MAC address as the network adapter. However, we can't just set it to use the same MAC address because address conflicts are very very bad. So, we need a second adapter that we can dedicate to the Phone emulator. The reason we disable TCP/IP on this adapter is so our host machine doesn't use it and cause these conflicts.

    Other things to try:

    The emulator keeps randomly breaking for me. I'll list a few other things I messed with this last time that got it to work(not sure if related, so only try these if the steps above aren't working

    • "Reordering" of network adapters for the emulator so that the external virtual switch is at the top (make sure to copy over the MAC address for the internal adapter)
    • Removing unrelated network adapters
    • Restarting your machine after recongiguring virtual switches
    • Praying to your local Microsoft evangilist

    Seriously. Everytime I stop phone work for a while and come back, the emulator is always magically broken without me changing anything. No idea how to get it to work "permanently".

    0 讨论(0)
  • 2020-11-28 06:59

    Here's what worked for me:

    1. Go into the internal network connection created by hyper-v in network connections on the host computer. Go to TCP/IP V4 and go to advanced. Change the metric from automatic to 10.
    2. Go to the external network connection, do the same but set the metric to 1.

    Volia, internet in the emulator.

    0 讨论(0)
  • 2020-11-28 07:02

    Disabling the Wifi, and Virtual Wifi inside "Network Connections" worked for me.

    0 讨论(0)
  • 2020-11-28 07:04

    Something else that seems to also cause an issue is Fiddler.

    I had Fiddler open and running (as I was monitoring other HTTP requests), and it was stopping the emulator from connecting.

    As soon as I closed Fiddler, the emulator starting connecting perfectly.

    0 讨论(0)
  • 2020-11-28 07:06

    After spending about 3 days on this i finally got it working. (on Windows 8 using WiFi)

    1. Start Fresh, Remove HyperV, Restart, Install Hyper V, Restart
    2. Open your VS solution and run the emulator.
    3. When prompted for letting the emulator access the internet say yes.
    4. Let the emulator and your project fully load
    5. Shut down the emulator and VS
    6. Open Network and Sharing Centre
    7. Click change Adapter Settings (on the left hand side)
    8. You should have some new adapter created by HyperV, they should be called "vEthernet(...)"
    9. The ones you are interested in are the vEthernet( Virtual Switch) and vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)
    10. Open the properties on your vEthernet( Virtual Switch) and navigate to the sharing tab.
    11. Choose Allow other Network users to connect and choose the vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch) as the adapter
    12. Ok the changes, and then open the properties on vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)
    13. Disable Internet Protocol Version 6 and double click on Internet Protocol Version 4
    14. Use the following IP address: 169.254.169.177 Subnet mask:255.255.0.0
    15. Click advanced, under the IP settings tab, assign an interface metric: 1
    16. Open VS and re run your project under and emulator, wait a few minutes for it to load.
    17. Try and open IE within the emulator and confirm you have internet access.

    Good luck

    0 讨论(0)
  • 2020-11-28 07:08

    After 3 days we have finally solved it. We had to make ip address dynamic. After making it dynamic emulator could reach internet. We didn't have to change anything else.

    0 讨论(0)
提交回复
热议问题