
07-05-2011 09:24 AM
All:
Not sure if anyone has tried this yet, but I am running into an strange issue with the new Mobile Client.
I am doing an AJAX call using Ext.Ajax.request.
While on Development, everything works great. As soon as I run the code through the JSBit/JSBuilder process and copy it over to my "production" environment, my call fails.
Using Chrome, I see that my call has a Status of "Canceled" on the Network tab.
I have tried quite a few things here, without luck. Regardless of what parameters I add to the request, it always shows as Canceled.
Some of the things I tried:
Use different URLs, FQDNs pointing to the Dev and Production URI for the Call. Same results, it works fine on Dev but not on Prod, which seems to indicate that the problem is due to the JSBit build.
Solved! Go to Solution.
07-06-2011 08:07 AM
As an update, the problem is not just related to Ext.Ajax.request, but it will also fail with XMLHttpRequest
Seems to be related to Cross Site Scripting, but I just don't see how that could be the case since the script origination is the same as the Target of my call.
One thing I did notice is that when the Call is made from the Dev site, there are cookies being added to the Request that don't appear to be added when in Production mode.
07-06-2011 09:56 AM
07-06-2011 11:16 AM
Since I was getting HTTP Status = 0 I thought it could be due to Cross Domain querying, but when I purposedly executed a Cross Domain request, Chrome accurately told me what I was doing wrong.
Now, here is an Interesting twist:
I added Fiddler to the midst.
The code works 100% of the time if fiddler is in the middle (e.g. running as a Proxy Server).
Not sure where this leaves me. I had a work around in place previously to getting the data by attaching a Code Snippet property to the entities, but that off course hinders other users of SDATA if they do "wild card" queries that include these fields....
Thank you for your response, I will keep at it, but will rollback to my previous implementation to get my code "out the door".....
07-06-2011 11:53 AM
Maybe a difference in the config files between prod and dev? (Other than the obvious.)
07-08-2011 03:52 PM
For those interested, this may have something to do with HTML5 security (or a bug on the Offline vs Online mode).
First of all, how to allow XmlHTTPRequest calls to items within the SLXMobile application folder:
* Add an Entry on the Manifest under the NETWORK section for ../SlxMobile
Now, how to do so (it took a bit longer to discover):
I had tried several times modifying the Index.manifest to no avail. I then plugged Fiddler into the picture and found out that the Manifest was being built out of the Index.Manifest.ashx file
A quick review of the Index.Manifest.ashx files shows that it uses the template.manifest. So, I ended up having to modify the template.manifest, adding ../SlxMobile to the NETWORK section.
I was under the Impression that the NETWORK key was to specify those items that would only be available while online (as it means don't cache....
Hope my pain and countless hours of research and troubleshooting will help someone else ...