2

I'm trying to run on Blackberry 10 an application which already works fine on Android&iOS.

When I do a call to server I always get "Origin local:// is not allowed by Access-Control-Allow-Origin": why I'm facing a cross domain issue"? I never got any issue about cross-domain the other phonegap platforms.

I'm using Cordova 2.3, the latest WebWorks SDk for BB10 and the latest BB10 simulator (but I have the same problem also when deploying on the Dev Alpha B device).

In the config.xml of the project I already checked the : <access subdomains="true" src="*"/>

There is some other configuration around?

3 Answers3

0

I could be wrong here, but I think the issue is that you cannot use a wildcard in the SRC attribute.

mr.subtle
  • 65
  • 1
  • 7
0

I think the correct syntax should be <access subdomains="true" uri="*"/>

Nappz
  • 101
  • 1
  • 5
-1

Your hosted service should support cross domain access.

For WCF service the following configurations should be available in the web.config

<system.webServer>
    <httpProtocol>
      <customHeaders>
        <add name="Access-Control-Allow-Origin" value="*" />
        <add name="Access-Control-Allow-Headers" value="Content-Type" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>

<webHttpBinding>
   <binding crossDomainScriptAccessEnabled="true">
     <security mode="None" />
   </binding>
</webHttpBinding>

Hope it helps...

Happy Coding!!!