none
Unhandled Exception while retrieving data from a WCF service

    Pytanie

  • Hi,

    I created CRM plug-in and registered it to ONLINE CRM 2011 (message: Create; PrimaryEntity: Account; Mode: asynchronous; Stage: Post Stage).

    When Account was created the plugin calls external WCF service by the https protocol to transfer data about created account (BasicHttpBinding used).

    But always exception occurred. 

     

    Plugin Trace:

    [CreateMtAccount: CreateMtAccount.CreateAccount]

    [00aae1b2-c453-e011-8f3a-18a905732a1b: CreateMtAccount.CreateAccount: Create of account]

    Error Message:

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Security.SecurityException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #D2B37DFADetail: 

    <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">

      <ErrorCode>-2147220970</ErrorCode>

      <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />

      <Message>System.Security.SecurityException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #D2B37DFA</Message>

      <Timestamp>2011-03-21T14:10:23.9345137Z</Timestamp>

      <InnerFault i:nil="true" />

      <TraceText>

    [CreateMtAccount: CreateMtAccount.CreateAccount]

    [00aae1b2-c453-e011-8f3a-18a905732a1b: CreateMtAccount.CreateAccount: Create of account]

     

    </TraceText>

    </OrganizationServiceFault>

     

    P.S. The service is registered in DNS.

    Does anyone know what can I do?

    Thank you for your help.

    ---

    Cheers,
    Max.

     

     

     

     


    21 marca 2011 14:30

Wszystkie odpowiedzi

  • Moving to development and bumping

    Regards, Donna

    22 marca 2011 17:22
  • Hi Max,

     

    I have a MS support ticket open on a very similar issue, I take it you are using WebClient to make the call

    I have tried WebClient, WebRequest, HttpWebRequest and get a 50% success rate with wither your error or a SecurityException and even a generic "ISV Error" form.  Its the same result with the SDK WebClient example.  Im hoping for a quick resolution on this.

     

    Cheer

    Richard


    Richard Barclay
    28 marca 2011 13:11
  • Hi Max,

     

    I have a MS support ticket open on a very similar issue, I take it you are using WebClient to make the call

    I have tried WebClient, WebRequest, HttpWebRequest and get a 50% success rate with wither your error or a SecurityException and even a generic "ISV Error" form.  Its the same result with the SDK WebClient example.  Im hoping for a quick resolution on this.

     

    Cheer

    Richard


    Richard Barclay

    Hi Richard,

     

    I was able to get correct a exception message…

    I think when threw exception we can’t view any trace info.

    May be CRM stream can’t have independent Trace and Exception streams.

    So when an exception is occurred all Trace information lost.

    And I did the following.

    All Initialization part and call service I have wrapped in a try catch construction and an exception message I transferred to "task" entity (“description” field).

    And all exception I could see in a task.

     

    I saw following message exception:

    Error message1: There was no endpoint listening at [my service address] that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

    Inner exception message2: Unable to connect to the remote server

     

    But my service available from internet and it is working correctly!

     

    My be you will be seen same interesting an exception message too.


    ---

    Cheers,
    Max.

    31 marca 2011 14:37
  • Did MS support answer for that ticket?

    I also have problem with WebClient calls. I wrapped call into try-catch block and get this exception:

     

    System.Net.WebException: Unable to connect to the remote server ---> 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 178.63.65.211:80
       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)
       --- End of inner exception stack trace ---
       at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)
       at System.Net.WebClient.UploadString(Uri address, String method, String data)
       at MoberiaPlugin.MoberiaCallCreatePlugin.Execute(IServiceProvider serviceProvider)


    MW
    13 kwietnia 2011 09:46
  • Did you ever find a solution to this?  I have the same issue.

    Thanks,

    Debbie


    Debbie Bird

    5 grudnia 2013 22:10