Month: April 2013

Windows Phone Emulator Error

While trying to run Windows Phone emulator I was facing given error.

The Windows Phone Emulator wasn’t able to create the virtual machine: Something happened while creating a switch: Xde couldn’t find an IPv4 address for the host machine


Simple Resolution to this problem is:

  • Run Hyper-V Manager as Admin

  • Go to Action > Virtual Switch Manager.

  • Click on “New Network Switch’

  • Select Internal and Create Virtual Switch

  • Give Name of Virtual Switch as “Windows Phone Emulator Internal Switch”

  • Click “OK” and restart your machine.

    After following these steps you should be able to run Windows Phone 8 Emulator without any issue.

    In case it solves/ doesn’t solve your problem mention that in comments.

Connection Error in CRM 2011 Plugin


Recently one of my colleagues was facing an issue while executing a plugin in CRM 2011 OnPremise environment. In his plugin he was trying to push some data from CRM to Facebook using webservice exposed by Facebook.


The Web Service plug-in failed in OrganizationId: e04e7680-a484-e211-8a47-00155d8863b2; SdkMessageProcessingStepId: 1e269463-4795-e211-adef-00155d8863b2; EntityName: new_post; Stage: 20; MessageName: Create; AssemblyName: XYZ.Plugin.PushToFacebook, XYZ.Plugin, Version=, Culture=neutral, PublicKeyToken=c345a3907d3249f7; ClassName: XYZ.Plugin.PushToFacebook; Exception: Unhandled Exception: System.Net.WebException: Unable to connect to the remote server

   at XYZ.Plugin.PushToFacebook.Process(String message, String facebookPathPostId, IOrganizationService service)

   at XYZ.Plugin.PushToFacebook.Execute(IServiceProvider serviceProvider)

   at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)

   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)

Inner Exception: System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)


He complained that same plugin worked fine for him in OnLine scenario but failed in OnPremise.


In this particular scenario exception message clearly said that “A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond” the connection was not getting established properly

Things which could be causing problems:

  1. No Internet Exception – Check à Machine was connected to internet, he was able to explore service through browser
  2. Firewall – Check à Exception was set for specified ports for both inbound and outbound.
  3. Proxy – Check à It was set in LAN Settings in browser (Oooopsssss….)


So here was the problem, proxy was set for browser, not system/environment wide. So I asked him to use WebProxy object to make his call from plugin via proxy server and everything started working fine.


You can go through given link for looking into webproxy object:


Do comment if you find same exception and this solution doesn’t work.