Hi,

I am having a strange problem with this method. This method fails with
certain URL's

I have this method in an executable and i run the executable using a
spawned process
that is using, System.Diagnostics.Process proc = new
System.Diagnostics.Process();
and i run the process.

This method in exe fails for certain url's when executed through a
spawned prcocess only.

Can any one help me out why this happenning?

Re: Help regarding System.Net.HttpWebRequest.Create(tmpUrl) by Joerg

Joerg
Thu Nov 10 16:42:55 CST 2005

Srir wrote:

> Hi,
>
> I am having a strange problem with this method. This method fails with
> certain URL's
>
> I have this method in an executable and i run the executable using a
> spawned process
> that is using, System.Diagnostics.Process proc = new
> System.Diagnostics.Process();
> and i run the process.
>
> This method in exe fails for certain url's when executed through a
> spawned prcocess only.
>
> Can any one help me out why this happenning?

Can you provide some examples?

Cheers,
--
http://www.joergjooss.de
mailto:news-reply@joergjooss.de

Re: Help regarding System.Net.HttpWebRequest.Create(tmpUrl) by Sriram

Sriram
Thu Nov 10 16:56:49 CST 2005

for example...

i try to create use this method to get the http response as a string..

objRequest =
System.Net.HttpWebRequest.Create(tmpUrl) <----------------
objResponse = objRequest.GetResponse()
sr = New
StreamReader(objResponse.GetResponseStream())
result = sr.ReadToEnd()

This method throws an exception when i run the Exe containing the above
method as a spawned process


System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
proc.StartInfo.FileName = textBox1.Text +".exe";
proc.StartInfo.Arguments=textBox2.Text;
proc.StartInfo.Arguments=textBox3.Text;
proc.Start();
proc.WaitForExit();

The exe runs fine and does not throw an exception when i run the
executable through Command Line
but fails when i run the exe through the spawned process.

thank you sriram


Re: Help regarding System.Net.HttpWebRequest.Create(tmpUrl) by Sriram

Sriram
Thu Nov 10 17:05:03 CST 2005

for example...

i try to create use this method to get the http response as a string..

objRequest =
System.Net.HttpWebRequest.Create(tmpUrl) <----------------
objResponse = objRequest.GetResponse()
sr = New
StreamReader(objResponse.GetResponseStream())
result = sr.ReadToEnd()

This method throws an exception when i run the Exe containing the above
method as a spawned process


System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
proc.StartInfo.FileName = textBox1.Text +".exe";
proc.StartInfo.Arguments=textBox2.Text;
proc.StartInfo.Arguments=textBox3.Text;
proc.Start();
proc.WaitForExit();

The exe runs fine and does not throw an exception when i run the
executable through Command Line
but fails when i run the exe through the spawned process.

thank you sriram