I have an application in 1 site collection and I'm trying to get it to return operation: "GetUserCollectionFromSite" from a different collection.
The different collections are in the same web application, the account I use in the collection where the application is running is the same account used in the site I am trying to reach. They are both collection admins.
I'm setting my webURL using the defaults object:
The different collections are in the same web application, the account I use in the collection where the application is running is the same account used in the site I am trying to reach. They are both collection admins.
I'm setting my webURL using the defaults object:
//SET DEFAULT APPLICATION WEBURL FOR SPSERVICES
$scope.setWebURL = function (portal) {
console.log(portal);
var webURL = portal.webURL;
$().SPServices.defaults.webURL = webURL;
}
This is the result I get: Request URL:https://target.ca/_vti_bin/usergroup.asmx
Request Method:OPTIONS
Status Code:401 Unauthorized
Request Headersview source
Accept:*/*
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Access-Control-Request-Headers:accept, content-type
Access-Control-Request-Method:POST
Connection:keep-alive
Host:target.ca
Origin:https://origin.ca
Referer:https://origin.ca/md/SitePages/Home.aspx
User-Agent:Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36
Response Headersview source
Connection:Keep-Alive
Content-Length:16
Content-Type:text/html; charset=utf-8
Date:Sun, 20 Apr 2014 20:37:03 GMT
MicrosoftSharePointTeamServices:14.0.0.6106
Server:Microsoft-IIS/7.5
SPRequestGuid:6337ec3d-f95f-4045-913e-feaef69e9064
WWW-Authenticate:NTLM
WWW-Authenticate:Basic realm="serviceottawa.ottawa.ca"
X-Powered-By:ASP.NET
Errors in console:OPTIONS https://spweb2.ca/_vti_bin/usergroup.asmx 401 (Unauthorized)
XMLHttpRequest cannot load https://target.ca/_vti_bin/usergroup.asmx. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://origine.ca' is therefore not allowed access. jquery.js:8706