getRequestStream() in compact framework throws filenotfound and uriformat except

Hi All,

Using .net Compact Framework I am trying to post something to a server say http://www.indiatimes.com:80.

First I create a webrequest object with a URL. Then I assign the required properties to the object and call the getRequestStream() method.
Here i am getting three exceptions. Two filenotfound Exception and a UriformatException. These three exceptions occur in the single getRequestStream method and is not caught by the TRY and CATCH blocks. After the exception I am able to write to the stream.

somebody please tell me why the exceptions are thrown and will it cause problems to what i am writing to the stream.

Here is the code snippet i use

string strId = "123";
string strName = "name";

ASCIIEncoding encoding=new ASCIIEncoding();
string postData="userid="+strId;
postData += ("&username="+strName);
byte[] data = encoding.GetBytes(postData);

// Prepare web request...

HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create("http://www.indiatimes.com:80");

myRequest.Method = "POST";
myRequest.ContentType="application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length;
Stream newStream=myRequest.GetRequestStream();

// Send the data.
newStream.Write(data,0,data.Length);
newStream.Close();

Thanks,
Deepa
[1440 byte] By [deepalakshmi] at [2007-11-19 2:38:20]