Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
Posts: 10
Registered: ‎03-26-2013
My Device: BlackBerry Z10
My Carrier: Vodafone

'Access to "https://mycompany.mywebservices.com/WcfDataService1.svc" not allowed'

[ Edited ]

Hi all,

 

I'm having trouble getting my HTML5 WebWorks application to connect to some data services that my application requires to progress. I have a 'registration' screen which is where you point the application to for the web services. But whenever I connect, I receive the error: 'Access to "https://mycompany.mywebservices.com/WcfDataService1.svc" not allowed'. The URI could change depending on what web services we use - so I attempted to make use of the following, to no luck:

<access uri="*" subdomains="true" /> 

 

I know there are a few posts floating around on this issue, but following them all seems to have landed me in no better position that what I was before reading them - and I'm getting a bit stuck. I read that the wildcard character doens't work on BlackBerry, thus tried the following:

 

<access uri="https://mycompany.mywebservices.com/WcfDataService1.svc" subdomains="true" />

 

But even that did not work unfortunately. The 'mycompany' part of the URL is what can change, so I attempted:

<access uri="https://*.mywebservices.com/WcfDataService1.svc" subdomains="true" />

 But even that wasn't successful! I've tried a lot of combinations but they seem to be getting me no where. Is there a limitation on what I can/can't connect to that's not allowing my WebWorks application to connect? Am I doing something obviously wrong as I cannot seem to get any combination to work.

 

If someone could help me, it would be a huge assistance! Many thanks.

 

Edit: modified my last access rule.

Contributor
Posts: 10
Registered: ‎03-26-2013
My Device: BlackBerry Z10
My Carrier: Vodafone

Re: 'Access to "https://mycompany.mywebservices.com/WcfDataService1.svc" not allowed'

Resolved it now Smiley Happy

 

It required the following snippet in the config.xml:

 

  <feature id="blackberry.app" required="true" >
    <param name="websecurity" value="disable" version="1.0.0.0" />
  </feature>

 

BlackBerry Development Advisor
Posts: 762
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: 'Access to "https://mycompany.mywebservices.com/WcfDataService1.svc" not allowed'

I wouldn't recommend disabling all web security unless it's absolutely necessary.

 

You should be able to whitelist that domain with the following

 

<access uri="https://mywebservices.com" subdomains="true" />

 

Contributor
Posts: 10
Registered: ‎03-26-2013
My Device: BlackBerry Z10
My Carrier: Vodafone

Re: 'Access to "https://mycompany.mywebservices.com/WcfDataService1.svc" not allowed'

Great - thank you! That certainly did help. It's weird why "https://*.mywebservices.com" didn't work - are wildcards completely disallowed in BlackBerry's config files?

Highlighted
BlackBerry Development Advisor
Posts: 762
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: 'Access to "https://mycompany.mywebservices.com/WcfDataService1.svc" not allowed'

Not sure why, I would imagine it's by design though.