G
George Ter-Saakov
In my ASPX page i want to output the result of another ASPX page to the
file.
So i wrote following code
private void Page_Load(object sender, System.EventArgs e)
{
StreamWriter sw = new StreamWriter("c:\\TestFile.txt");
SimpleWorkerRequest wr= new SimpleWorkerRequest("General.aspx", "", sw);
HttpRuntime.ProcessRequest(wr);
}
But second line throws an exception
System.NullReferenceException: Object reference not set to an instance of an
object.
I can hit General.aspx with the browser and it works without any problem.
Thanks.
George.
file.
So i wrote following code
private void Page_Load(object sender, System.EventArgs e)
{
StreamWriter sw = new StreamWriter("c:\\TestFile.txt");
SimpleWorkerRequest wr= new SimpleWorkerRequest("General.aspx", "", sw);
HttpRuntime.ProcessRequest(wr);
}
But second line throws an exception
System.NullReferenceException: Object reference not set to an instance of an
object.
I can hit General.aspx with the browser and it works without any problem.
Thanks.
George.