Sage SalesLogix
  • Contact Us
  • Sage North America
800-643-6400
Welcome Twitter Facebook LinkedIn
Community Home Blogs Share Ideas Search Request Access Resources
Reply
Copper Elite Contributor
tdowning@solidconcepts.com
Posts: 63
Registered: 03-09-2011

Interesting SData Client Exception

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.GetResponse()
   at Sage.SData.Client.Core.SDataService.ExecuteRequest(String url, RequestOperation operation, MediaType[] accept)
   at Sage.SData.Client.Core.SDataService.ReadEntry(SDataBaseRequest request, AtomEntry entry)
   --- End of inner exception stack trace ---
   at Sage.SData.Client.Core.SDataService.ReadEntry(SDataBaseRequest request, AtomEntry entry)
   at Sage.SData.Client.Core.SDataService.ReadEntry(SDataBaseRequest 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

SDataCSharpClientLib from the GitHub site

Please use plain text.
Gold Super Contributor
RJLedger
Posts: 2,234
Registered: 03-19-2009

Re: Interesting SData Client Exception

A - Saleslogix 7.5.3 or 7.5.4?

 

B - What was the last time you downloaded the clientlib source? Always use the latest.

--
RJ Ledger - rjledger@rjlSystems.net

".. Stay Focused..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
Please use plain text.
Copper Elite Contributor
tdowning@solidconcepts.com
Posts: 63
Registered: 03-09-2011

Re: Interesting SData Client Exception

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

 

Please use plain text.
Gold Super Contributor
RJLedger
Posts: 2,234
Registered: 03-19-2009

Re: Interesting SData Client Exception

The client lib has been updated since then. Suggest you get/download the latest.

--
RJ Ledger - rjledger@rjlSystems.net

".. Stay Focused..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
Please use plain text.
Employee
mdykun
Posts: 71
Registered: 04-13-2009

Re: Interesting SData Client Exception

Based on the error I would not suspect that the error is coming from the client library, or version of it.

Please use plain text.
Copper Elite Contributor
tdowning@solidconcepts.com
Posts: 63
Registered: 03-09-2011

Re: Interesting SData Client Exception

I gete a few random not repeatable 500 errors per day. Kind of frustrating.

Please use plain text.
Employee
mdykun
Posts: 71
Registered: 04-13-2009

Re: Interesting SData Client Exception

does even viewer lead to something more detailed around IIS? That is where I would start and go from there.

Please use plain text.
Copper Elite Contributor
tdowning@solidconcepts.com
Posts: 63
Registered: 03-09-2011

Re: Interesting SData Client Exceptions

The majority have the following

 

Exception caught during the processing of a message
Verb: GET
Uri: http://domainname/sdata/slx/dynamic/-/Contacts('C6UJ9A0017HC')

 

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.RequestTargetRegistration.RequestTargetInvoker.Invoke(IRequest request)
at Sage.Integration.Messaging.Request.Process(RequestTargetInvoker invoker)
at Sage.Integration.Adapter.AdapterController.RealAdapterController.Process(IRequest request)
at Sage.Integration.Adapter.AdapterController.RealAdapterController.ProcessWorker(IProtocolRequest protocolRequest)
at Sage.Integration.Adapter.AdapterController.Process(IProtocolRequest request)
at Sage.Integration.Messaging.MessagingService.Process(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.StartAdapter(IServiceProvider provider, String path)
at Sage.Integration.Messaging.MessagingService.Process(IProtocolRequest protocolRequest)

 what is the state of which object??

 

All in all not very meaningful errors to me

Please use plain text.
Moderator
jperona
Posts: 232
Registered: 05-07-2008

Re: Interesting SData Client Exceptions

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/SDataCSharpClientLib

 

 

John Perona

Director, SalesLogix Engineering

Sage SalesLogix

Sage

Please use plain text.
Copper Elite Contributor
tdowning@solidconcepts.com
Posts: 63
Registered: 03-09-2011

Re: Interesting SData Client Exceptions

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.GetResponse() at Sage.SData.Client.Core.SDataService.ExecuteRequest(String url, RequestOperation operation, MediaType[] accept) at Sage.SData.Client.Core.SDataService.ReadEntry(SDataBaseRequest 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.

 

 

Please use plain text.