Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Authentication string truncated and causing error Code 400

$
0
0
Hi, I really love your jQuery library and I have been using it without any problem with SharePoint 2007. Recently my company upgraded to SharePoint 2010 and I am noticing random errors with the SOAP query. The same code would sometimes return good response and sometimes result in error. This is driving me crazy.

I compared the SOAP request that returned a successful response with the SOAP request that returned error and the only difference that I see is with the Authorization: string in the request.

I am using Chrome Developer view to capture the SOAP message. Note that If I simply replay the XHR request, it sometimes sends a longer Authorization string in the SOAP request and it returns a valid response..

I am using the new promise way of doing the query and I am executing query on 7 lists. Sometimes, all 7 works. Sometimes, 6 of them will work and 1 would result in an error. And i see that the "Authorization:" string in the SOAP request for the failed query is different from the successful ones.

What I wanted to know is: How is the authorization string calculated and do you know why it would get corrupted/truncated at random?

e.g. The failed request looks like this:
Request URL:http:/xxxxxxxxxxxxxxxxxxxxxx/_vti_bin/Lists.asmx
Request Method:POST
Status Code:400 badrequest
Request Headersview source
Accept:application/xml, text/xml, */*; q=0.01
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Authorization:NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAGAbEdAAAADw==
Content-Length:736
Content-Type:text/xml;charset='UTF-8'
Cookie:__utma=240286337.1783481512.1372325602.1376989320.1384754503.3; __utmz=240286337.1372325602.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=http://sabre.com/
Host:xxxxxxxxxxxxxx.com
Origin:http://xxxxxxxxxxxx.com
Proxy-Connection:keep-alive
Referer:http://xxxxxxxxxxxxxxxxxxxxxxxxxx.html
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
X-Requested-With:XMLHttpRequest
Request Payload
<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'><soap:Body><GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'><listName>HolderDatabaseError</listName><viewName></viewName><query><Query> <Where><Eq><FieldRef Name="LinkedProblemId" /><Value Type="Number">17</Value></Eq> </Where></Query></query><viewFields><ViewFields><FieldRef Name='ID' /><FieldRef Name='LinkedProblemId' /><FieldRef Name='File' /><FieldRef Name='Record' /><FieldRef Name='Field' /></ViewFields></viewFields><rowLimit>0</rowLimit><queryOptions><QueryOptions></QueryOptions></queryOptions></GetListItems></soap:Body></soap:Envelope>
Response Headersview source
Cache-Control:no-cache
Connection:Close
Content-Length:899
Content-Type:text/html
Via:1.0 xxx.xxx.220.28 (McAfee Web Gateway 7.3.2.3.0.16052)
The successful request looks like this:
Request URL:http://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/_vti_bin/Lists.asmx
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:application/xml, text/xml, */*; q=0.01
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Authorization:NTLM TlRMTVNTUAADAAAAGAAYAJIAAAAYABgAqgAAAAwADABYAAAAEgASAGQAAAAcABwAdgAAAAAAAADCAAAABYKIogYBsR0AAAAPayzKAcJ2s/IonFO5smPa3kcATABPAEIAQQBMAFMARwAwADIAMQAzADEAOQAwAEgAOAA0ADYAMAAzADAANQAzADMAMQAxxxxxxxxxxxxxxxxAAAAAAAAAAAAAAAAAAAAC40J9yjygdazHZxxxxxxxxxxxxxxxxxxxxxxxx=
Content-Length:736
Content-Type:text/xml;charset='UTF-8'
Cookie:__utma=240286337.1783481512.1372325602.1376989320.1384754503.3; __utmz=240286337.1372325602.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=http://xxxxxxxxxxx
Host:xxxxxxxxxxxxx
Origin:xxxxxxxxxxx.com
Proxy-Connection:keep-alive
Referer:http://xxxxxxxxxxxxxxxxxx.html
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
X-Requested-With:XMLHttpRequest
Request Payload
<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'><soap:Body><GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'><listName>HolderDatabaseError</listName><viewName></viewName><query><Query> <Where><Eq><FieldRef Name="LinkedProblemId" /><Value Type="Number">17</Value></Eq> </Where></Query></query><viewFields><ViewFields><FieldRef Name='ID' /><FieldRef Name='LinkedProblemId' /><FieldRef Name='File' /><FieldRef Name='Record' /><FieldRef Name='Field' /></ViewFields></viewFields><rowLimit>0</rowLimit><queryOptions><QueryOptions></QueryOptions></queryOptions></GetListItems></soap:Body></soap:Envelope>
Response Headersview source
Cache-Control:private, max-age=0
Content-Length:1563
Content-Type:text/xml; charset=utf-8
Date:Tue, 19 Nov 2013 13:56:55 GMT
MicrosoftSharePointTeamServices:14.0.0.7102
Persistent-Auth:false
Proxy-Connection:Keep-Alive
Server:Microsoft-IIS/7.5
SPRequestGuid:1292ff30-b96e-461f-84b0-69447b4905b6
X-AspNet-Version:2.0.50727
X-MS-InvokeApp:1; RequireReadOnly
X-Powered-By:ASP.NET
X-SharePointHealthScore:0

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>