BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 12-21-2009, 01:56 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Dec 2009
Location: Sri Lanka
Model: 9000
PIN: N/A
Carrier: Software Engineer
Posts: 21
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Java HTTPConnection 406 - Not Acceptable

Please Login to Remove!

Hi,

I am developing some blackberry application which use http connection. The program work fine on simulators. But when I install it to the device the http connection failed. Then I traced it by getResponseCode and getResponseMessage.

Response Code = 406
Response Message = Null

The program work fine with all simulators. The problem occur when I run this on the device.
Please help me to sort out this issue.

Here is attach my coding.

Thank you.


Prasad
Attached Files
File Type: txt problem.txt (2.2 KB, 3 views)

Last edited by prasadrajapaksha : 12-21-2009 at 02:03 AM.
Offline  
Old 12-21-2009, 08:25 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

I notice that you are not setting any content or encoding info in the request headers, nor are you setting the user agent header.

I would try this first.

Also, take a look at your server-side error logs - you'll usually get more info there.
Offline  




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