BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 05-21-2009, 11:10 AM   #1 (permalink)
New Member
 
ebergese@sofrecom's Avatar
 
Join Date: Jan 2009
Location: Bs As - Argentina
Model: 8110
OS: xp sp3
PIN: N/A
Carrier: dont know
Posts: 8
Post Thanks: 0
Thanked 0 Times in 0 Posts
Angry BES domain problem 401 error!

Please Login to Remove!

Hello, i have a very big problem with httpConnection. I have an auto run app that pulls every x time a request to a basic secure http and retrieves an image. I have a Carrier with BES server.

Note: in de simulator everything works fine (i set the domain , user and pass in de MDS emulator properties files - MdsLogin.conf and rimpublic.property).

But in the real device i have two scenarios:

1)
I start up my device and i run debug via usb. I see that my app make the request and response an HTTP 401. I thinks that its a domain problem. i dont know how to set via code (HttpConnection class) the domain, in the conn.setRequestProperty("Authorization","Basic " + encodeduserPass);
A can´t find a properties like setRequestProperty("domain", mydomain);


2)
I start up my device and i run debug via usb. First i test de url connection with the device default browser and it pop up de login credentials (domain, user , pass) the domain have a default (it takes BES domain from somewhere ), a accept de credentials (and set remember my decition) and it works fine in the browser , i can see the image. Then i run my app and every works fine (response code 200) but after 4 or 5 minutes the request faild and give me a 401 (the same url and user pass that works fine seconds before)
Then when its fails i open again de default web browser and put the url, the pop up with the credentials appears again (Nevertheless i set remember credentials the first time).
The point is that mi HttpConnection works fine if first a put the credentials in the default web browser, but after 5 minutes that credentials seems to lost and my app fails.

I have to configure de domain in the device operative system or with java code ??.

Please help, i have to finish the project.

Thanks a lot.

pd: sory for mi english.

pd2: My device especifications are : 8800 v 4.2.1.90 (platform 2.3.0.72), the simulator where everything works fine is JDE 4.2 with plugin eclipse.
__________________
Practice good sportsmanship, you were a noob once
Trying to develop BB app
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.