We have a page which sends a copy of itself via email to customers. To
enable this, the page calls Server.Execute on itself into a text stream and
strips its own output down to HTML presentable to the customer.
In our Test environment (but not our DEV or Local envs) we are experience an
ASP.NET lockup. The WHOLE asp.net architecture freezes, and we must reboot
the server before any of our other ASP.NET apps will work.
This is a sample of the code which appears to be the culprit. We commented
out the Server.Execute and substituted some junk text to build sbText and th
e
code worked fine on our test environment again.
-- Locks server
StringBuilder sb = new StringBuilder();
sb.Append(base.AppRoot).Append("/ER/OOWLetter.aspx?ERNumber=");
sb.Append(erNumber);
System.IO.TextWriter textwriter = new System.IO.StringWriter();
StringBuilder sbText = new StringBuilder(textwriter.ToString());
Server.Execute(sb.ToString(), textwriter);
Is there any known issue with Server.Execute on itself?I expect it would just cause a recursive request of the page requesting
server.execute - and hang your server?
Regards
John Timney
Microsoft Regional Director
Microsoft MVP
"Chuck Haeberle" <Chuck Haeberle@.discussions.microsoft.com> wrote in message
news:6F2D019E-2D08-48EC-AC32-0DF6BBDAD3DE@.microsoft.com...
> We have a page which sends a copy of itself via email to customers. To
> enable this, the page calls Server.Execute on itself into a text stream
and
> strips its own output down to HTML presentable to the customer.
> In our Test environment (but not our DEV or Local envs) we are experience
an
> ASP.NET lockup. The WHOLE asp.net architecture freezes, and we must
reboot
> the server before any of our other ASP.NET apps will work.
> This is a sample of the code which appears to be the culprit. We
commented
> out the Server.Execute and substituted some junk text to build sbText and
the
> code worked fine on our test environment again.
> -- Locks server
> StringBuilder sb = new StringBuilder();
> sb.Append(base.AppRoot).Append("/ER/OOWLetter.aspx?ERNumber=");
> sb.Append(erNumber);
> System.IO.TextWriter textwriter = new System.IO.StringWriter();
> StringBuilder sbText = new StringBuilder(textwriter.ToString());
> Server.Execute(sb.ToString(), textwriter);
> Is there any known issue with Server.Execute on itself?
It shouldn't, but I'll look into it.
The call to Server.Execute occurs only within a postback when a button on
the page is pushed to generate the email. As I said, this poses no problem
whatsoever on our local machines (5 developers) or on our development server
environment. Only in our Test env is there an issue.
"John Timney (Microsoft MVP)" wrote:
> I expect it would just cause a recursive request of the page requesting
> server.execute - and hang your server?
> --
> Regards
> John Timney
> Microsoft Regional Director
> Microsoft MVP
>
> "Chuck Haeberle" <Chuck Haeberle@.discussions.microsoft.com> wrote in messa
ge
> news:6F2D019E-2D08-48EC-AC32-0DF6BBDAD3DE@.microsoft.com...
> and
> an
> reboot
> commented
> the
>
>
Saturday, March 24, 2012
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment