This project has moved and is read-only. For the latest updates, please go here.

Cross Domain Access

Jul 15, 2011 at 3:16 PM
From ankurparmar Today at 4:16 AM
We are using SPServices 0.6.1 and it works great.
The only problem that we are facing is that when accessing a site from other domain we getting a javascript error "SPServices is null or not defined."
Also IE 8 is asking for username and password.We have enter the correct credentials bu it is asking again for credentials.

Please provide us a solution for that .



Jul 15, 2011 at 3:19 PM

The first thing I would check is whether the reference to the SPServices .js file is correct in domain B. Also, if you are referencing it in domain A, make sure that it is available for read to all authenticated users (or everyone)


Jul 19, 2011 at 7:22 AM
Edited Jul 19, 2011 at 7:24 AM


The problem is that the js file is not downloaded when page loads and it is asking for username and password.

The behavior is different at Domain A and Domain B machines for http://xyz/sites/sitecollection for same user credentials.

At Domain A machine -
1. Logged in to  http://xyz/sites/sitecollection with site admin user id (ex- admin)
2. Navigate to Site Assets\js folder.
3. Try "download a copy" of any file. We are able to download files.

At Domain B Machine - 
1. Logged in to  http://xyz/sites/sitecollection with site admin user id (same as above)
2. Navigate to Site Assets\js folder.
3. Try "download a copy" of any file. We are prompted for credentials. Even after entering details again, files could not be downloaded.

WE are not sure what is the problem since logged in user is admin of site collection.

Note : http://xyz/sites/sitecollection site is also added trusted site. and file is available to read for logged in user.

Please share the solutions if anyone knows it.



Jul 19, 2011 at 5:23 PM
Edited Jul 19, 2011 at 5:24 PM

The fact that you have the credential issue right in the UI tells me that it has nothing to do with the Web Services calls with SPServices.

Try to track down that issue first!


p.s. You might want to ask about this on SharePoint Overflow.