Acessing a list from My Sites in another Site Collection

Jun 4, 2015 at 10:42 AM
Edited Jun 4, 2015 at 10:43 AM
Hi
If I am in MySites and I have a SPServices Call using GetListItems to another site collection say http://fred.com/sites/sitewithlist where the list is sited on I am getting 0x8007005 error. Is there anything special about mysites other than being a pain in the butt to brand ?

Thanks

Nigel
Coordinator
Jun 4, 2015 at 12:09 PM
You're probably running into a Cross Site Scripting issue, depending on how your domains are set up. I'm not sure exactly what that error code is, though, Can you post the full response packet?

M.
Jun 4, 2015 at 12:33 PM
Hi Marc

Thanks for coming back so quickly.

Here are the images you require.

https://onedrive.live.com/redir?resid=A55E3A0A975C8A9C!419542&authkey=!APyGfb6HtcEVRB4&ithint=file%2cdocx

Regards

Nigel
Coordinator
Jun 4, 2015 at 12:52 PM
It does look like a cross-domain issue. I can't tell what domain you're starting from, but the webURL should be relative, if possible. So rather than http://fred.com/sites/sitewithlist , it should be /sites/sitewithlist.

I also notice that you're using .find("[nodename=z:row]"). That will only work in IE, so you should use SPFilterNode.

Finally, there's an option in your call "crossDomain: true". Wishful thinking.

M.
Jun 4, 2015 at 12:56 PM
Hi Marc

So are you saying we cannot fix it ?

Is there a way of accessing a list on another site collection from MySites ?

The url is full because it points to the list in the other site collection.

Regards
Nigel
Coordinator
Jun 4, 2015 at 12:59 PM
You definitely can request info from a different Site Collection, but you cannot cross domains. The latter is a browser security limitation.

M.
Jun 4, 2015 at 1:21 PM
HI Marc

Requesting from: "http://www.xxxxxx-mysitespoc.abc.co.uk/person.aspx"

Awaiting response from a list within: "http://www.xxxxxx-poc.abc.co.uk/sites/lookup/"

Its not going across domains. Domain = abc.co.uk

Technically it is going across sub-domains?

"www.[xxxxxx].abc.co.uk......"

Regards

Nigel
Coordinator
Jun 4, 2015 at 1:25 PM
Right. This is where you have a conversation with the IT Pros and find out how things are set up under the covers.

CORS is controlled on the target server, not in your code or in the source server.

M.
Jun 4, 2015 at 1:59 PM
Thanks Marc