问题
I am using ucwa skype api. I have downloaded sample from ucwa.skype.com. while running the sample I need to login to my skype for business account. It gives me the below error.
jquery-1.6.2.min.js:17 GET http://lyncdiscoverinternal.ge.com/xframe net::ERR_NAME_NOT_RESOLVED(anonymous function) @ jquery-1.6.2.min.js:17domManip @ jquery-1.6.2.min.js:17domManip @ jquery.tmpl.min.js:1append @ jquery-1.6.2.min.js:17html @ jquery-1.6.2.min.js:17Transport.obj.injectFrame @ Transport.js:516startAutoDiscover @ AutoDiscovery.js:51AutoDiscovery.obj.startDiscovery @ AutoDiscovery.js:141beginDiscovery @ Index.js:91processAuthClick @ Index.js:101(anonymous function) @ Index.js:163handle @ jquery-1.6.2.min.js:17k @ jquery-1.6.2.min.js:16 Transport.js:479 Frame location not found within timeout (10000): http://lyncdiscoverinternal.ge.com/xframe XFrame.js:143 GET http://lyncdiscover.ge.com/xframe 403 (Forbidden)sendRequest @ XFrame.js:143(anonymous function) @ XFrame.js:207 scriptInjector.js:193 sI: inside WIDGET_CONTENT_MESSAGE message listener: MessageEvent scriptInjector.js:194 MessageEvent scriptInjector.js:193 sI: inside WIDGET_CONTENT_MESSAGE message listener: MessageEvent scriptInjector.js:194 MessageEvent Transport.js:186 Service does not allow a cross domain request from this origin. AutoDiscovery.js:93 Autodiscovery failed on internal/external location contentScript.js:234 cs: onRequestListener(Arguments[3]) contentScript.js:234 cs: onRequestListener(Arguments[3])
回答1:
This issue (Service does not allow a cross domain request from this origin.) is mostly caused by the "Cross-Origin Resource Sharing (CORS)" and that the address which is requesting the access isn´t "whitelisted".
An Skype for Business Administrator can configure that via (more info's here):
$x = New-CsWebOrigin -Url "https://apps.contoso.com"
Set-CsWebServiceConfiguration -Identity "{YOUR_IDENTITY}" -CrossDomainAuthorizationList @{Add=$x}
before you change that, check if that is already done via:
Get-CsWebServiceConfiguration | select -ExpandProperty CrossDomainAuthorizationList
So that you will not overwrite something
来源:https://stackoverflow.com/questions/40757281/lync-service-does-not-allow-a-cross-domain-request-from-this-origin