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

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Regular Contributor
Posts: 52
Registered: ‎07-04-2011
My Device: Bold-3
My Carrier: Developer

HTTP response code : 401

Hello,

 

I have some issue in that I can not understand.

I got HTTP response code 401 when I tried to authenticate.

I entered the right username & password thought I got 401.

While I used the same password & username in other device I got perfect response.

So, it is hard to me to understand what was the issue?

Is there any issue regarding Wifi / BES / BIS ?

Is any possibility that BES server has blocked the URL ?

 

If anyone has any answer please suggest your idea.

 

Thanks.,

 

 

 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: HTTP response code : 401

Have a look at this:

http://supportforums.blackberry.com/t5/Java-Development/Implement-basic-HTTP-authentication/ta-p/445...

 

Note:

 

You have a number of outstanding questions that I'm guessing are probably solved, since you are no longer posting on them.  Can you please go through these and mark up the solutions.  Thanks.

 

To save you looking, here are some of them:

http://supportforums.blackberry.com/t5/Java-Development/Response-code-505/m-p/2078077#M213679

http://supportforums.blackberry.com/t5/Java-Development/Download-image-in-custom-list/m-p/2067697#M2...

http://supportforums.blackberry.com/t5/Java-Development/Lazy-Loading/m-p/2060807#M213499

Regular Contributor
Posts: 52
Registered: ‎07-04-2011
My Device: Bold-3
My Carrier: Developer

Re: HTTP response code : 401

[ Edited ]

Thanks for reply,

 

I go through your posted link.

I have tested my code regarding authentication, it worked on so many devices, issue came on only one device, may be in that device we use Enterprise Server for connection , so just want to know how to resolve that issue ?

But on those threads still I did not get solutions,so I did not mark  them as solutions.

 

Regards,

 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: HTTP response code : 401

There is a trick with BES.  Even if you know that your request is going to require a login, you can not supply the basic authentication header until it is actually requested.  So do not supply it on the first request, wait for the BES to come back with a 401 and then connect again supplying it.  The KB article I pointed you at demonstrates code that does this.  I suspect that is the problem you are having. 

 

"But on those threads still I did not get solutions,so I did not mark  them as solutions."

May be not, but those Threads are waiting for input from you and have been for some time.  If you can't get a solution from the input so far perhaps you should try something or ask another question?  Or are you still working on them? 

Highlighted
Regular Contributor
Posts: 52
Registered: ‎07-04-2011
My Device: Bold-3
My Carrier: Developer

Re: HTTP response code : 401

OK.

Yes, I am still working on those threads.

 

Regards,