BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-17-2008, 01:36 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: India
Model: 8700g
Carrier: Airtel
Posts: 117
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default ControlledAccessException.

Please Login to Remove!

hi,
I am using 8100, OS 4.2.1. I have developed an application, which selects the pictures from the file system and mails them to a specifies user. Problem is when the application tries to access the filesystem, i get a ControlledAccessException. The application works fine on the simulator. I have kept all the application permissions on 'allow'.There are no policies applied w.r.t. the application.

Could some suggest y i am getting this error, and how can i solve the problem.
__________________
Thanks
Meenal
Offline  
Old 07-17-2008, 02:30 AM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

are you trying to send your own pictures or those provided on the device?
Offline  
Old 07-17-2008, 09:58 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi!

Your code must come with a signature (from RIM) in order to use certain APIs that are restricted. Somewhere in your application - probably the part that accesses the device's file system - you're using a class or a method that requires your application to be signed.

The same code will execute on the simulator without a signature, although fledge.exe (the application that runs the simulators) can be configured to require code to be signed for the controlled-access APIs.

Cheers,

karl
__________________
Karl G. Kowalski
---------------
Owns a RAZR
Develops for BlackBerry
So next phone will be........an iPhone 3G!
Offline  
Old 07-17-2008, 10:02 AM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

And before I forget....

Code Signing works like this: you pay RIM a nominal fee to get signing keys, then you register your copy of the Signature Tool with RIM using those keys. Then you use the Signature Tool to sign your COD file(s) by RIM; the Signature Tool makes a hash value out of the COD file(s), transmits the hash value to RIM, RIM signs the hash value with its own keys, and then returns the signed hash value to the Signature Tool, which adds the signed hash value (one for each set of restricted APIs that your code requires access to) to your COD file(s). The devices then find this data in your COD file and allows you to execute.

Cheers,

karl
__________________
Karl G. Kowalski
---------------
Owns a RAZR
Develops for BlackBerry
So next phone will be........an iPhone 3G!
Offline  
Old 07-18-2008, 01:51 AM   #5 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: India
Model: 8700g
Carrier: Airtel
Posts: 117
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi holy3daps ,
My application is signed. So that should not be a problem.
In fact it was working fine, before i upgraded my device.

hi Ivanov,
The last two pictures clicked by the camera are picked by the application.
__________________
Thanks
Meenal

Last edited by Meenal : 07-18-2008 at 09:59 AM.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.