Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Nickel Elite Contributor
tdowning@solidconcepts.com
Posts: 107
Registered: ‎03-09-2011

Can anyone tell me what this means?

Occasionaly I get this inner exception when making a call to SData.  It happens on different entities and is random. I have not been able to force it.

 

Information before and after this is from my client code and not especially relevant.

 

For some reason the Sage SData Client has an issue reading feeds and I don't know why.

 

Moments later the very same call works as expected.

 

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.ReadFeed(SDataBaseRequest request, String& eTag) --- End of inner exception stack trace --- at Sage.SData.Client.Core.SDataService.ReadFeed(SDataBaseRequest request, String& eTag) at Sage.SData.Client.Core.SDataService.ReadFeed(SDataBaseRequest request) 

 

Essentialy I'm making a read call to SData using the SData Client and this is the exception. Is there any way to increase the logging on the SData Client and get more meaningful data besudes "there was an error"?

 

Please use plain text.
Bronze Super Contributor
mlaspina
Posts: 236
Registered: ‎03-30-2009

Re: Can anyone tell me what this means?

Is there anything in the event log on the SData server?  That could provide mroe detail.

 

If not, you can always crank up the logging level int he Log4net.config file in the SData directory on your webserver.

Mike LaSpina
Professional Services Consultant

Sage
8800 N Gainey Center Dr Ste 200
Scottsdale AZ 85258
Tel: 480-383-5344
Cell: 480-321-6637
Fax: 480-556-4090
mike.laspina@sage.com

Your Business in Mind.
Please use plain text.
Nickel Elite Contributor
tdowning@solidconcepts.com
Posts: 107
Registered: ‎03-09-2011

Re: Can anyone tell me what this means?

Ok, I think I found part of the problem

 

we are setup to use https: port 443 in ur production environment.

 

for some reason the links that are being formed for subordinate data the port is being set to port 80: so the url lookl like this

 

Exception caught during the processing of a message Verb: GET Uri: https://somehost:80/sdata/slx/dynamic/-/contacts?where=AccountId eq 'A6UJ9A0006VH'

 

Note the port set to 80 using https:

 

Where can I make sure this is set correctly.

When I view the feeds in IE9 the initial cal to the feed executes correctly, clicking on a link causes an error.

 

I think when we programtically attempt to get related information the url is confused generating the errors.

 

Example:

using https://somehost/sdata/slx/dynamic/-/contacts in the browser returns a list of contacts

view source

and the URI for each of the contacts

sdata:uri="https://somehost:80/sdata/slx/dynamic/-/contacts('C6UJ9A004SM2')"

 

Note again the :80- after the host entry.  

 

Where do I fix this??

 

 

 

 

Please use plain text.
Bronze Super Contributor
mlaspina
Posts: 236
Registered: ‎03-30-2009

Re: Can anyone tell me what this means?

I beleive this is done at the IIS level.  SSL typically operates on port 80, so you'll need to tweak some settings in IIS.

Mike LaSpina
Professional Services Consultant

Sage
8800 N Gainey Center Dr Ste 200
Scottsdale AZ 85258
Tel: 480-383-5344
Cell: 480-321-6637
Fax: 480-556-4090
mike.laspina@sage.com

Your Business in Mind.
Please use plain text.
Nickel Elite Contributor
tdowning@solidconcepts.com
Posts: 107
Registered: ‎03-09-2011

Re: Can anyone tell me what this means?

Yes, I figured that much out.

 

Which setting is now the question. IIS7 BTW

 

So, any IIS gurus out there, please chime in.

 

Good news, I can replicate the scenario on my local system, so at least I can figuire it out without tromping around in my production system.

 

I'll report what I learn ion case I find something out.

Please use plain text.
Bronze Super Contributor
mlaspina
Posts: 236
Registered: ‎03-30-2009

Re: Can anyone tell me what this means?

[ Edited ]

I asked around - you'll want an ISAPI redirector for IIS to redirect the port 80 requests to your port.  There are a few free ones out there, or you could write your own. 

 

Since you stated you're in IIS7, you can also use URL Rewrite

Mike LaSpina
Professional Services Consultant

Sage
8800 N Gainey Center Dr Ste 200
Scottsdale AZ 85258
Tel: 480-383-5344
Cell: 480-321-6637
Fax: 480-556-4090
mike.laspina@sage.com

Your Business in Mind.
Please use plain text.
Nickel Elite Contributor
tdowning@solidconcepts.com
Posts: 107
Registered: ‎03-09-2011

Re: Can anyone tell me what this means?

I'm sorry mike but this does not sound correct.

 

I believe the problem is in SData or a config setting somewhere.

 

The payloads are not being constructed properly to begin with.

requests on 443 should not be injecting port 80 into URLs

 

Example

https://localhost/sdata/slx/dynamic/-/contacts?where=Account.Id eq 'A6UJ9A0006VH'
The result works and we get data back

In the example above the request returns the expected number of records.

In each entry that is returned as part of the feed. Related Entries are referenced in the return payload by a url to get the data for that relation.

Here is the problem when using SSL

The port on the related entry’s sdata:uri and sdata:lookup properties is being set to :80 by SData Example snippets from actual payload results
<sdata:smileytongue:ayload>
<slx:Contact sdata:key="C6UJ9A000BTO" sdata:uri="https://localhost:80/sdata/slx/dynamic/-/contacts('C6UJ9A000BTO')" sdata:uuid="00000000-0000-0000-0000-000000000000" sdata:lookup="https://localhost:80/sdata/slx/dynamic/-/contacts">
<slx:Account sdata:key="A6UJ9A0006VH" sdata:uri="https://localhost:80/sdata/slx/dynamic/-/accounts('A6UJ9A0006VH')" sdata:uuid="00000000-0000-0000-0000-000000000000" sdata:lookup="https://localhost:80/sdata/slx/dynamic/-/accounts" />
<slx:Address sdata:key="a6UJ9A000K7J" sdata:uri="https://localhost:80/sdata/slx/dynamic/-/addresses('a6UJ9A000K7J')" sdata:uuid="00000000-0000-0000-0000-000000000000" sdata:lookup="https://localhost:80/sdata/slx/dynamic/-/addresses" />
<slx:smileyfrustrated:hippingAddress sdata:key="a6UJ9A000K7J" sdata:uri="https://localhost:80/sdata/slx/dynamic/-/addresses('a6UJ9A000K7J')" sdata:uuid="00000000-0000-0000-0000-000000000000" sdata:lookup="https://localhost:80/sdata/slx/dynamic/-/addresses" />
<slx:Addresses sdata:uri="https://localhost:80/sdata/slx/dynamic/-/contacts('C6UJ9A000BTO')/Addresses" />
<slx:LeadSources sdata:uri="https://localhost:80/sdata/slx/dynamic/-/contactLeadSources?where=Contact.Id eq 'C6UJ9A000BTO'" />
<slx:ContactMergeAudits sdata:uri="https://localhost:80/sdata/slx/dynamic/-/contactMergeAudits?where=Contact.Id eq 'C6UJ9A000BTO'" />
<slx:Contracts sdata:uri="https://localhost:80/sdata/slx/dynamic/-/contracts?where=Contact.Id eq 'C6UJ9A000BTO'" />
<slx:Membership sdata:key="Q6UJ9A006YJL" sdata:uri="https://localhost:80/sdata/slx/dynamic/-/memberships('Q6UJ9A006YJL')" sdata:lookup="https://localhost:80/sdata/slx/dynamic/-/memberships" />
<slx:smileysurprised:pportunities sdata:uri="https://localhost:80/sdata/slx/dynamic/-/opportunityContacts?where=Contact.Id eq 'C6UJ9A000BTO'" />
<slx:smileysurprised:wner sdata:key="F6UJ9A00000B" sdata:uri="https://localhost:80/sdata/slx/dynamic/-/owners('F6UJ9A00000B')" sdata:lookup="https://localhost:80/sdata/slx/dynamic/-/owners" />
<slx:smileytongue:rocesses sdata:uri="https://localhost:80/sdata/slx/dynamic/-/processes?where=Contact.Id eq 'C6UJ9A000BTO'" />
<slx:smileyfrustrated:alesOrders sdata:uri="https://localhost:80/sdata/slx/dynamic/-/salesOrders?where=RequestedBy.Id eq 'C6UJ9A000BTO'" />
<slx:Tickets sdata:uri="https://localhost:80/sdata/slx/dynamic/-/tickets?where=Contact.Id eq 'C6UJ9A000BTO'" />
<slx:AccountManager sdata:key="U6UJ9A00000B" sdata:uri="https://localhost:80/sdata/slx/dynamic/-/users('U6UJ9A00000B')" sdata:lookup="https://localhost:80/sdata/slx/dynamic/-/users" />

 

https://somesite:80 will fail every time as SSL and https use port 443.  The port should not be getting populated at all. What bit of magic in SData is setting the port in the payload of the entry?

Calls on http: are correct with no port entry at all

Calls on my local system over http: have the correct port that I have set in the binding 3334. https calls set the port to 80.

 

Something is broken.

 

Please use plain text.
Bronze Super Contributor
craigf
Posts: 260
Registered: ‎04-14-2009

Re: Can anyone tell me what this means?

Guys,

 

Was there any further update on this, I have today moved our production web instance to a new server and whilst in test I did not notice this, sods law now I have moved it, it is on HTTPS port 443 I am getting errors noticeably when using Mobile, or Sdata I am seeing references as per reported here, with port 80 referenced, error below, server.domain have been changed in the below example.

 

 

Exception caught during the processing of a message

Verb: GET

Uri: https://server.domain.co.uk:80/Sdata/$systemadapters

 

This is on 7.5.4 HF4

 

Any advice appreciated.

 

Regards

Craig

 

Please use plain text.
Nickel Elite Contributor
tdowning@solidconcepts.com
Posts: 107
Registered: ‎03-09-2011

Re: Can anyone tell me what this means?

I think it's a bug in the exception coding that logs the error. I still get errors, but they are valid 400 and 500 errors. 

Specifically for the 400 errors, duplicates found when using a single resoure request URL, or no record found when making single resource request.

 

If there is a possibllity of duplicates or missing data, use a collection request instead and enumerate the results.

 

I'm in the process now of refactoring my pwn cusotm SData Repositories that serve several custom applications we use, the IT guys are having troubles with all of the noise on these highly trafficed requests.

 

Please use plain text.
Copper Super Contributor
markanderson
Posts: 23
Registered: ‎08-17-2009

Re: Can anyone tell me what this means?

The fix for this was wrapped up in some other changes that were part of Web HF5. Apply that and the HTTPS port will now be preserved when you use a HOST header.
Please use plain text.