วันพุธที่ 9 พฤษภาคม พ.ศ. 2555

Proxy Support for Windows Phone Emulator

Proxy Support for Windows Phone Emulator

This topic describes proxy support on Windows Phone Emulator for connecting to intranets and to the Internet. Some proxy configuration options are not supported on Windows Phone. The same limitations that apply to Windows Phone also apply to Windows Phone Emulator.
The following proxy configuration options are supported:
  • Specifying whether to use a proxy server.
  • Specifying the proxy server address and the port.
  • Specifying whether to bypass the proxy server for local addresses.
Other proxy configuration options are not supported. For example, if you specify URLs or IP addresses in the proxy exception list, Windows Phone Emulator ignores the exceptions.
This topic contains the following sections:
Windows Phone Emulator supports automatic network configuration for most of the common scenarios, such as a direct connection to the Internet, a connection to the Internet by using a proxy server, and a connection to the network by using VPN. The emulator automatically configures the proxy settings by querying the operating system for the proxy information. Developers can simply start Windows Phone Emulator and begin using network-based applications without specifying the configuration or a running a tool.
However, if your application is not able to access the network, try the following steps, or follow the steps in the section that describes the specific issue:

Test Network Connectivity on the Host Computer

Verify that the issue is specific to the emulator rather than the host computer.
  • Verify that you have network connectivity on the host computer.
  • Verify that the Internet is accessible by opening a non-cached Web page from the host computer, and then open the same page by using Internet Explorer on the emulator.

Cannot Connect to an Intranet Site by Using a Fully-Qualified Domain Name or IP Address

If you try to connect to an intranet site by using a fully-qualified domain name (FQDN) or IP address and are unable to connect, you might need to disable proxy settings to connect to intranet sites. For more information, see Disabling Proxy Settings for Windows Phone Emulator.
If you specify a Web service by using the format http://localhost:port/servicename.svc, the network connection will work. However, if you specify a Web service by using the format http://computername:port/servicename.svc, the network connection fails because computername translates to an FQDN. To avoid this issue, you can search for the FQDN and replace it with computername.

Cannot Connect to an Intranet Site over a Virtual Private Network

If you are using the emulator over a virtual private network (VPN) connection, you might need to disable proxy settings to connect to intranet sites. For more information, see Disabling Proxy Settings for Windows Phone Emulator.

Cannot Connect to an Intranet Site by Using Manual Proxy Settings

If the host computer uses manual proxy settings and you are trying to connect to intranet sites on Windows Phone Emulator, you might need to bypass the proxy server for local addresses. For more information, see Bypassing the Proxy Server for Local Addresses.
The emulator attempts to connect to intranet sites by using LAN settings in the same order as Internet Explorer. The emulator first attempts to connect to intranet or Internet sites by using automatically detected settings. If that fails, it attempts to connect by using other settings. The following list shows the order in which the emulator uses LAN settings:
  1. Automatically detected settings
    During automatic detection, Windows Phone Emulator detects proxy settings and the Bypass Proxy Server option is enabled by default.
  2. Automatic configuration script
  3. Manual LAN settings (proxy server settings)
    If proxy server settings are in use, and the Bypass Proxy Server option is not set, Windows Phone Emulator cannot connect to intranet sites.
NoteNote:
If both manual and automatically detected settings are selected in the LAN settings dialog box, the emulator first attempts to use the automatically detected settings.

Cannot Connect to the Internet Using a WPAD Script

If the network uses Web Proxy Auto-Discovery (WPAD) and WPAD is configured using an automatic configuration script set in the Control Panel, any of the following issues can prevent Windows Phone Emulator from connecting to the network:
  • No proxy servers are available or no Internet access on the corporate network.
    For more information, see Test Network Connectivity on the Host Computer.
  • A specific proxy server may be unavailable.
    A WPAD script may designate multiple proxies to handle network connections. A desktop computer can use multiple proxy servers specified in a WPAD file but Windows Phone OS 7.0 and Windows Phone Emulator can use only one proxy server. If the specific proxy server is unavailable, you can renew your IP address to obtain a new WPAD script. This action updates the proxy server.
    To renew your IP address:
    1. Open a command prompt on the host computer with Administrator privileges.
    2. Type ipconfig /renew.
    3. Restart Windows Phone Emulator.

Cannot Connect to the Internet Using a Proxy that Requires Authentication

Windows Phone Emulator does not support connecting to the Internet using a proxy that requires authentication. In this scenario, the emulator can only connect to intranet sites.

Push Notifications Do Not Work

Possible causes for this include:
  • Windows Phone Emulator is not fully started.
  • A SOCKS proxy must be configured.
The push client service on Windows Phone Emulator must be ready before you can use push notification APIs. Push client service on the emulator takes two minutes to activate after you start the emulator, starting from when the Start screen first appears.
NoteNote:
The service may start faster if you wait until the Start screen appears, and then deploy the application again without closing the emulator.
If the development computer is behind a proxy, you must configure the SOCKS proxy. For more information, see Configuring the SOCKS Proxy for Windows Phone Emulator.
NoteNote:
You may see some minor variations in menu commands or window layouts depending on whether you are using Visual Studio 2010 Express for Windows Phone or the add-in for Visual Studio 2010 Professional or Visual Studio 2010 Ultimate.

Cannot Connect to the Network While Fiddler is Running

Fiddler is not supported in this release. If you configure Fiddler to track all network traffic, then the emulator cannot connect to the network. In some testing scenarios, you may be able to work around this issue by taking the following steps:
  1. Configure Fiddler to track only Internet traffic.
  2. Use manual proxy settings and bypass the proxy server for local addresses. For more information, see Bypassing the Proxy Server for Local Addresses.
    This will allow the emulator to connect to an intranet site.
To configure the proxy settings for the emulator, use the Internet properties on the development computer. Any supported configuration option that you specify here applies to the emulator.

Disabling Proxy Settings for Windows Phone Emulator


To disable proxy settings

  1. In Control Panel, open Internet Options.
    On Windows 7, you access Internet Options from Control Panel by clicking Network and Internet and then Internet Options.
    NoteNote:
    If you change these settings through the browser instead of Control Panel, settings might not work on some browsers.
  2. In the Internet Properties dialog box, on the Connections tab, click Settings or LAN settings, depending on whether you are configuring options for a VPN or a LAN.
  3. Clear all the settings in the IT Connection Manager Settings or Local Area Network (LAN) Settings dialog box.
  4. Restart the emulator and try to reconnect.

Bypassing the Proxy Server for Local Addresses


To bypass the proxy server for local addresses

  1. In Control Panel, open Internet Options.
    On Windows 7, you access Internet Options from Control Panel by clicking Network and Internet and then Internet Options.
    NoteNote:
    If you change these settings through the browser instead of Control Panel, settings might not work on some browsers.
  2. In the Internet Properties dialog box, on the Connections tab, click LAN Settings.
  3. In the Local Area Network (LAN) Settings dialog box, make sure that Use a proxy server for your LAN is selected.
    If there are no proxy settings configured, skip the remaining steps. Your host computer is not using manual proxy settings.
  4. Select Bypass proxy server for local addresses.
    This setting applies to host names, but not to IP addresses or fully-qualified domain names.
  5. Restart the emulator and try to reconnect.

Configuring the SOCKS Proxy for Windows Phone Emulator


To configure the SOCKS proxy

  1. In Control Panel, open Internet Options.
    On Windows 7, you access Internet Options from Control Panel by clicking Network and Internet and then Internet Options.
    NoteNote:
    If you change these settings through the browser instead of Control Panel, settings might not work on some browsers.
  2. In the Internet Properties dialog box, on the Connections tab, click Settings.
  3. In the IT Connection Manager Settings dialog box, make sure that Use a proxy server for this connection is selected.
  4. Click Advanced.
  5. In the Socks server type field, specify the proxy address and the port, for example, 1080.
  6. Restart the emulator and try to reconnect.

Configuring General Proxy Settings for Windows Phone Emulator


To configure general proxy settings

  1. In Control Panel, open Internet Options.
    On Windows 7, you access Internet Options from Control Panel by clicking Network and Internet and then Internet Options.
    NoteNote:
    If you change these settings through the browser instead of Control Panel, settings might not work on some browsers.
  2. In the Internet Properties dialog box, on the Connections tab, click Settings or LAN settings, depending on whether you are configuring options for a VPN or a LAN.
  3. Configure your settings.
  4. Restart the emulator to make sure the settings take effect.

ไม่มีความคิดเห็น:

แสดงความคิดเห็น