473,561 Members | 3,644 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTTP Post Problem in Pocket PC

I posted this question in PocketPC newsgroup with no answer. Hopefully
somebody in this newsgroup can help me.

I have problem with HTTP post in Compact Framework. The code below is
a function I use to post a HTTP message. This code works in Windows XP
always. When I compile the same code to run on an iPaq PocketPC 2003
it works exactly 2 times and then fails afterward at line
"GetResponseStr eam()" with the exception;
"System.Net.Web Exception; Could not find resource assembly"
I have tried this code through the ActiveSync USB link and also a
SocketComm compact flash network card on the iPaq with exactly the same
failure after two times working properly. If I quit the application
and run it again it works again for two times and then fails afterward.

I can't figure out why this code works on Windows XP and fails after
exactly two times in an iPaq under Compact Framework. Is there a
resource that is not released in PocketPC? Can failure after 2 times
give a clue what might be wrong? Is there a way to modify the code to
work always? Is there a sample code for proper HTTP Post in PocketPC?
Any help is highly appreciated.
// -----------------------------------------------------
// -----------------------------------------------------
// -- HTTP Post function. Failing line shown ----------
// -----------------------------------------------------
public string HttpPost(string URI, string PostMessage)
System.Net.WebR esponse resp = null;
System.Net.WebR equest req = System.Net.WebR equest.Create(U RI);
req.ContentType = "text/xml";
req.Method = "POST";
req.Timeout = 2000; // 2 seconds
byte[] bytes =
System.Text.Enc oding.ASCII.Get Bytes(PostMessa ge);
req.ContentLeng th = bytes.Length;
System.IO.Strea m os = req.GetRequestS tream(); // <-- fails here
after 2 times
os.Write(bytes, 0, bytes.Length);
resp = req.GetResponse ();
catch (Exception e)
string msg = "HTTP Post failed\r\n";
msg += e.ToString();
return msg;
if (resp == null) return null;
System.IO.Strea mReader sr = new
System.IO.Strea mReader(resp.Ge tResponseStream ());
return sr.ReadToEnd(). Trim();

Dec 13 '05 #1
0 2187

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Jimmy | last post by:
Dear All, I have a interesting question, may sound dump. Could I develop a vb6 programs that run under win2000 server terminal services and the program is access by a pocket pc? How could I control the resolution or the screen size of the vb6 programs so it fit into the pocket pc screen ? Please let me know my option, why, how and...
by: santhosh_176 | last post by:
:I Created a Pocket PC application for iPAQ 5450. Every thing went fine even installer creation. I could run the setup and install it into the actual device and worked fine. The application enables syncronization with remote database using merge replication. I found contradictory results while installing the application. I will mention here...
by: dsnyder | last post by:
This HTML has a bit of Javascript at the end that puts the initial focus on the userID field. It works great on Windows2000 running IE6, but the initial focus never goes to the userID field on Windows 2003 PocketPC (Windows Mobile) running Pocket IE. <html><head><title>WMS - P280WF100 - Login</title><META HTTP-EQUIV='expires' VALUE='0'>...
by: Krishnan Margabandhu | last post by:
I'm writing a Pocket PC app that will run when a device is first powered on. I want this program to get some data from the user and invoke a CAB file to install a software on the device. How do I invoke a CAB file from the VB app? Thanks
by: M O J O | last post by:
Hi, I've developed a Windows VB.Net CRM application for my company. I need my own CRM application to be able to replicate it's calendar with my Pocket PC 2003 Outlook calendar. Understand me correct ... * I'm not developing a compactframework VB.Net application, but a
by: Neil Wallace | last post by:
Guys, I am hopping mad. I am just a hobby programmer making little .net applications for pretty much no-one else but me to use. One application I have written would, to my mind, work best on a handheld PC. Fortunately I have a Pocket PC - an HP jornada bought 4 years ago. Doing my
by: Daniel Liberman | last post by:
Hi, everyone. That's my environment: - I have a pocket pc (iPAQ h4350) application developed with VSNET2003/C# that has a SQL Server CE Database, running. That's working fine. Obs: the pocket is NOT supposed to have a wireless conection available. - I have an access database on a standalone desktop running Windows XP, i.e., there is NO...
by: pumaken68 | last post by:
Does anyone has experience with calling web service from pocket pc 2003 project in VS 2005 environment? I just migrated a smart device(pocket pc 2003) solution from VS 2003 to VS 2005. There are 3 projects inside solution: 1. pocket PC 2003 windows form project; 2. Business rules 3. a web service which will be used to download and upload...
by: Terry Metcalfe | last post by:
I have an Asus A696 pocket PC. I have written a small test program in VB6 called "Pocket PC" and compiled it just as I would normally do to run on my desk top. It runs on my desk top perfectly normally. I then copied the application file to my Pocket PC. When I try to run it on my Pocket PC I get the error message " 'Pocket PC' is not a...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.