HTTP GetResponse error on device only

willisgt

Active Member
Licensed User
I've run into a problem - one of my programs sends an HTTP request to a server, which then responds with a text string. The string is a concatenation of several database records, and is often quite long.

One of the program's users - just one - is encountering an error when the program makes the request. Specifically, the error occurs on the line:

Response.Value = Request.GetResponse

The error message is: 'An error occurred on sub_xferdata. An error message cannot be displayed because an optional resource assembly containing it cannot be found.'

This occurs only on the device, not on the desktop (either compiled or running in the IDE).

The device in question is an HTC 8925 / AT&T Tilt. I have copied the program and all associated files to a second HTC 8925, which experienced the same problem.

I'm thinking that there must be something in the string that the server sends back - a null character, or something that doesn't show in the log files (each record sent back to the devices is logged on the server).

Has anyone encountered anything like this with the HTTP library?


Gary

:sign0085:
 
Last edited:

willisgt

Active Member
Licensed User
The error message now reads "Could not establish connection to network".

I can certify to you that the program (running on the device) is sending its request to the server, because the server logs the request. The request is correctly formed and contains no errors.

So how could it be that the device can't connect to the network?


Gary
 

willisgt

Active Member
Licensed User
I have not tried to send the request with pocket explorer, as the request is rather lengthy.

What I absolutely do not understand is why only one of the devices is having this problem. All of the others - and there are quite a few - are working perfectly.

The response from the server is dependent on (1) the company the user works for, as this selects the database; (2) the id of the user, as this pulls records specific to that user; and (3) the date, as the server only returns records which are both unexpired and relevant for the next week or so (user selectable from 1 to 30 days).

If I configure another, identical device to the same company and user id, it works properly. The problem (I'm almost 100% sure) lies in the fact that the program requests updates for records it already has in the local (on the device) database. Since those records don't exist on the second device (working properly), it doesn't request updates for them, and the server doesn't return them.

I'll try entering the query into pocket explorer.


Gary
 

bparent

Member
Licensed User
Longtime User
Error message and optional resource Version 6.8

If you can please install this optional resource: Basic4ppc - Windows Mobile Development - View Single Post - error messages on device
It will now show a more descriptive error message.

I have installed the cab for WM 6 (I have 6.1) but I still get the same error saying I need to install "optional resource" for more descriptive error. I did a soft reset but nothing has changed.

I can run the same program in the desktop IDE without errors, but get this error on the device.

This may be related. If I remove the component and then add the library/dll I get this message. If I remove the object then try to add an object the menu is grayed out. If I remove the component and add it back in there is no opportunity to add an object.

Are the libraries different and version sensitive from 6.5 to 6.8? When I look at the About dialog both the Desktop and Device say 6.8.
 

bparent

Member
Licensed User
Longtime User
Error message and optional resource Version 6.8

Which libraries are you asking about?

Specifically, regarding the program running on the desktop but not the device is formlib.dll, but in general any library. Also, should the error reporting string resource work to give a more descriptive error?
 

bparent

Member
Licensed User
Longtime User
Error V6.8 with 6.6 files and libraries, etc

Most of the libraries were not changed in V6.80. FormLib was updated to allow changing the alignment of the new custom written labels.
About the resource string, what is your device locale?

I am in United States on Verizon, but not sure if that answers your question. Where can I determine my locale?

Probably I am doing something wrong. Everything worked fine on the desktop and device on 6.5. I upgraded to 6.8 and the same programs work fine on desktop but not 6.8. As soon as I try to Open Source from the device Ide I get a error that says it cannot provide more details without additional resources. I installed the string resource file you pointed to but no difference. I have formlib.dll in the same directory as the source file and even tried it in the same location as basic4ppc.exe and still get the error.

If I remove formlib.dll and then save the source file in another location and then add the formlib.dll file and accept it and save the file then run the program it will work at that time it will work on the device (coincidentally the IDE seems to copy the formlib.dll to where I saved the source file). If I shut down the ide on the device it may or may not work the next time I load and try to run it, and it will give the error again.

I was able to get setassociation.sbp to work this way. When I try to run a .sbp file from Total Commander I get an error about untrusted file or cannot find a component or something like that.

The formlib.dll I used I copied from the desktop library folder.

Any ideas?
 

bparent

Member
Licensed User
Longtime User
It seems to me that you've downloaded and installed the right resource file.
Did you install Basic4ppc on a storage card? Try to install it in the main memory.
Does optimized compiled application work on your device?

Yes, installed in storage card. It has worked before. I prefer storage card for obvious reasons to minimize usage of internal ram. Yes optimized compiled app worked.

Ok, I installed in main memory and things seem to be working. Will do more tests? Can you make Basic4PPC so it runs ok from storage card?
 
Top