Hi Guys,
Can someone please help me with this wierd issue?
I have a c# code below
-
string lcUrl = "myscript.cgi";
-
-
-
-
// *** Establish the request
-
-
HttpWebRequest loHttp =
-
(HttpWebRequest)WebRequest.Create(lcUrl);
-
-
-
-
// *** Set properties
-
-
loHttp.Timeout = 10000; // 10 secs
-
-
loHttp.UserAgent = "Code Sample Web Client";
-
//loHttp.
-
-
loHttp.Method = "GET";
-
-
-
-
// *** Retrieve request info headers
-
-
HttpWebResponse loWebResponse = (HttpWebResponse)loHttp.GetResponse();
-
-
-
-
Encoding enc = Encoding.GetEncoding(1252); // Windows default Code Page
-
-
-
-
StreamReader loResponseStream = new StreamReader(loWebResponse.GetResponseStream(), enc);
-
-
-
-
string lcHtml = loResponseStream.ReadToEnd();
-
-
-
-
loWebResponse.Close();
-
loResponseStream.Close();
-
This just goes to a perl cgi script white writes a log on the server. This script has also been attached.
Everything works fine from internet explorer or mozilla, but when i use the above code to fetch the data from the script it writes the same log entry twice which i believe is something to do with above.
Can someone please help???
Thanks in advance