
12-02-2011 04:54 PM
Attempting to read a contact record.
http://my SData Domain/sdata/slx/dynamic/-/Contacts/('Valid ContactID')
Sage.SData.Client.Core.SDataClientException: Operation is not valid due to the current state of the object. ---> Sage.SData.Client.Framework.SDataException: Operation is not valid due to the current state of the object. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error. at System.Net.HttpWebRequest.GetResponse() at Sage.SData.Client.Framework.SDataRequest.GetResponse() --- End of inner exception stack trace --- at Sage.SData.Client.Framework.SDataRequest.GetRespon se() at Sage.SData.Client.Core.SDataService.ExecuteRequest (String url, RequestOperation operation, MediaType[] accept) at Sage.SData.Client.Core.SDataService.ReadEntry(SDat aBaseRequest request, AtomEntry entry) --- End of inner exception stack trace --- at Sage.SData.Client.Core.SDataService.ReadEntry(SDat aBaseRequest request, AtomEntry entry) at Sage.SData.Client.Core.SDataService.ReadEntry(SDat aBaseRequest request) at Sage.SData.Client.Core.SDataSingleResourceRequest. Read()
Is there a way to determine the state of the object in question?? I'm getting a few of these errors per day, yet when I access these later they work just fine.
I'm just curious what
"Operation is not valid due to the current state of the object." really means and if there is a way to get more meaningful data from the exception.
SData client is from the
12-02-2011 05:02 PM
12-02-2011 05:07 PM
7.5.4 Sorry
SDataCSharpClientLib downloaded 7/28/2011
Using the .net 3.5 framework library from the scottsdale platform
// Assembly Sage.SData.Client, Version 1.3.1.1458
12-02-2011 05:28 PM
12-06-2011 09:31 AM
Based on the error I would not suspect that the error is coming from the client library, or version of it.
12-06-2011 09:33 AM
I gete a few random not repeatable 500 errors per day. Kind of frustrating.
12-06-2011 09:35 AM
does even viewer lead to something more detailed around IIS? That is where I would start and go from there.
12-06-2011 10:42 AM
The majority have the following
Exception caught during the processing of a message
Verb: GET
Uri: http://domainname/sdata/slx/dynamic/-/Contacts('C6 UJ9A0017HC')
the contact id varies but the message is the same
I have occasional
Exception caught during the processing of a message Verb: GET Uri: http://domainname/sdata/slx/dynamic/-/Contacts?startIndex=1&where=Email eq 'valid contact email address' System.Reflection.TargetParameterCountException: Parameter count mismatch. at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Sage.Integration.Messaging.RequestTargetRegistrati on.RequestTargetInvoker.Invoke(IRequest request) at Sage.Integration.Messaging.Request.Process(Request TargetInvoker invoker) at Sage.Integration.Adapter.AdapterController.RealAda pterController.Process(IRequest request) at Sage.Integration.Adapter.AdapterController.RealAda pterController.ProcessWorker(IProtocolRequest protocolRequest) at Sage.Integration.Adapter.AdapterController.Process (IProtocolRequest request) at Sage.Integration.Messaging.MessagingService.Proces s(IProtocolRequest protocolRequest)
but then this call works minutes later.
My personal favorie
System.InvalidOperationException: Operation is not valid due to the current state of the object. at Sage.Integration.Adapter.InstalledAdapter.CreateInstance(IServiceProvider provider) at Sage.Integration.Server.IntegrationServer.StartAda pter(IServiceProvider provider, String path) at Sage.Integration.Messaging.MessagingService.Proces s(IProtocolRequest protocolRequest)
what is the state of which object??
All in all not very meaningful errors to me
12-11-2011 10:16 AM
Terry,
We'll do some research on the errors, but all work won the Client Library for C# from the SalesLogix team is on our Github Site.
https://github.com/SageSalesLogix/SDataCSharpClien
John Perona
Director, SalesLogix EngineeringSage SalesLogix
![]()
12-12-2011 08:44 AM
Thanks John,
They work great 99% of the time (or better). We are unable to repeatedly reproduce.
They seem to center around this though.
Sage.SData.Client.Core.SDataClientException: The remote server returned an error: (500) Internal Server Error. ---> Sage.SData.Client.Framework.SDataException: The remote server returned an error: (500) Internal Server Error. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error. at System.Net.HttpWebRequest.GetResponse() at Sage.SData.Client.Framework.SDataRequest.GetResponse() --- End of inner exception stack trace --- at Sage.SData.Client.Framework.SDataRequest.GetRespon se() at Sage.SData.Client.Core.SDataService.ExecuteRequest (String url, RequestOperation operation, MediaType[] accept) at Sage.SData.Client.Core.SDataService.ReadEntry(SDat aBaseRequest request, AtomEntry entry) --- End of inner exception stack trace ---
We are using a tool called elmah to capture these exceptions and email them to key people. Fortunately, our usres have minimal impact and when they try again, everything works.
Ugly random exceptions like this are the hardest to deal with.