locked
Timeout exception while trying to register a plugin/custom workflow RRS feed

  • Question

  • I tried increasing the timout to 10 mins in web.config, registry and registration tool. But getting the same error message:

    Stack trace and fiddler request is given below:

    Stack Trace provided below :

    Unhandled Exception: System.TimeoutException: The request channel timed out while waiting for a reply after 00:02:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.

    Server stack trace:
       at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity)
       at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity)
       at PluginRegistrationTool.RegistrationHelper.RegisterAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly)
       at PluginRegistrationTool.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e)
    Inner Exception: System.TimeoutException: The HTTP request to 'http://servername/orgname/XRMServices/2011/Organization.svc' has exceeded the allotted timeout of 00:02:00. The time allotted to this operation may have been a portion of a longer timeout.
       at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
       at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
    Inner Exception: System.Net.WebException: The operation has timed out
       at System.Net.HttpWebRequest.GetResponse()
       at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

    Fiddler Request :

    <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><s:Header><a:Action s:mustUnderstand="1" u:Id="_4">http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Create</a:Action><a:MessageID u:Id="_5">urn:uuid:cf1e13d3-ba95-419c-aa72-0a40ba0f9059</a:MessageID><a:ReplyTo u:Id="_6"><a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address></a:ReplyTo><a:To s:mustUnderstand="1" u:Id="_7">http://servername/orgname/XRMServices/2011/Organization.svc</a:To><o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><u:Timestamp u:Id="uuid-d9433a0f-a885-4d36-99cc-8375b98d5992-143"><u:Created>2013-07-23T09:06:31.353Z</u:Created><u:Expires>2013-07-23T09:11:31.353Z</u:Expires></u:Timestamp><c:SecurityContextToken u:Id="uuid-d8d873eb-0919-419e-a437-8ded58fbd96b-205" xmlns:c="http://schemas.xmlsoap.org/ws/2005/02/sc"><c:Identifier>urn:uuid:8744c536-e879-447f-a49e-b0c00dd946bd</c:Identifier></c:SecurityContextToken><c:DerivedKeyToken u:Id="_0" xmlns:c="http://schemas.xmlsoap.org/ws/2005/02/sc"><o:SecurityTokenReference><o:Reference ValueType="http://schemas.xmlsoap.org/ws/2005/02/sc/sct" URI="#uuid-d8d873eb-0919-419e-a437-8ded58fbd96b-205"/></o:SecurityTokenReference><c:Offset>0</c:Offset><c:Length>24</c:Length><c:Nonce>ugRwyzv4ohTppf8F9N+JrQ==</c:Nonce></c:DerivedKeyToken><c:DerivedKeyToken u:Id="_1" xmlns:c="http://schemas.xmlsoap.org/ws/2005/02/sc"><o:SecurityTokenReference><o:Reference ValueType="http://schemas.xmlsoap.org/ws/2005/02/sc/sct" URI="#uuid-d8d873eb-0919-419e-a437-8ded58fbd96b-205"/></o:SecurityTokenReference><c:Nonce>r2p0Gi+Zj04IdEBpgmBKBA==</c:Nonce></c:DerivedKeyToken><e:ReferenceList xmlns:e="http://www.w3.org/2001/04/xmlenc#"><e:DataReference URI="#_3"/><e:DataReference URI="#_8"/></e:ReferenceList>


    Tuesday, July 23, 2013 9:19 AM

All replies

  • are you trying to register\load on the same machine or is your dll on your dev machine and you are trying to load it to a server outside the network? I had this problem because the server was external and the connection speed was horrible, the time to upload the dll would be too long

    Unfortunately I only could sort that out uploading the dll to the remote crm. if you can't run the plugin registration tool you can try a command line registration tool


    I Hope I could help. If I have answered please mark as 'Answer'. If was just helpful, please vote. Thanks and happy coding!


    • Edited by SH_2017 Tuesday, July 23, 2013 9:42 AM more
    Tuesday, July 23, 2013 9:37 AM
  • I am trying to load the dll in the server itself .
    Tuesday, July 23, 2013 10:06 AM
  • Are you using pluginregistration.exe from latest sdk?
    Tuesday, July 23, 2013 10:21 AM
  • yes I am using the latest pluginregistration tool
    Tuesday, July 23, 2013 10:59 AM
  • Change the location of your bin folder of SDK. Move it to desktop or some other drive and then try.
    Tuesday, July 23, 2013 11:35 AM
  • unregister the plugin.

    rebuild witha new version  and again reregister it.

    Thanks

    Tuesday, July 23, 2013 11:49 AM
  • I already tried all these methods...
    Tuesday, July 23, 2013 12:22 PM
  • Hi somodeep Sukla,  

    is it resolved ??. i'm facing the same issue ..

    Unhandled Exception: System.TimeoutException: The request channel timed out while waiting for a reply after 00:01:59.7049705. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.

    Server stack trace: 
       at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Xrm.Sdk.IOrganizationService.Update(Entity entity)
       at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.UpdateCore(Entity entity)
       at Microsoft.Crm.Tools.PluginRegistration.RegistrationHelper.UpdateAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly, PluginType[] type)
       at Microsoft.Crm.Tools.PluginRegistration.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e)
    Inner Exception: System.TimeoutException: The HTTP request to 'http://<servername>/GREW2011/XRMServices/2011/Organization.svc' has exceeded the allotted timeout of 00:01:59.9970000. The time allotted to this operation may have been a portion of a longer timeout.
       at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
       at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
       at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
    Inner Exception: System.Net.WebException: The operation has timed out
       at System.Net.HttpWebRequest.GetResponse()
       at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

    Wednesday, October 30, 2013 10:28 AM
  • In the command prompt type the below command :

    C:\Windows\system32>set l

    You will get a output like the below one:

    LOCALAPPDATA=C:\Users\crmdevadmin\AppData\Local
    LOGONSERVER=\\SERVERNAME

    Try adding the key to registry and reset iis. Hope your issue will get resolved.

    Registry path :HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM

    Create a key : PreferredDC of type string and give the value of SERVERNAME in the registry.

    Monday, November 25, 2013 2:54 PM