Hi all,
i was curious if there is a way to make the server return some variables when it crashes maybee all the variables maybe the requests,
i dont want to add try catch final stuff its not the best solution for my app, i just need in the return below make it show a list of variables and request is it possible? Thanks inadvance.
<SPAN>
<H1>Server Error in '/' Application.
<HR width="100%" color=silver SIZE=1>
</H1>
<H2><I>[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name
'qrqw'.</I> </H2></SPAN><FONT
face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "><B>Description:
</B>An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code. <BR><BR><B>Exception Details:
</B>System.Runtime.InteropServices.COMException: [Microsoft][ODBC SQL Server
Driver][SQL Server]Invalid column name 'qrqw'.<BR><BR><B>Source Error:</B>
<BR><BR>
<TABLE width="100%" bgColor=#ffffcc>
<TBODY>
<TR>
<TD><CODE><PRE>
Line 28: if not request("AgencyID") = "" then
Line 29: ssql="SELECT FTP, PassCode FROM Agency_Data WHERE agency = " & requestQuoteFIX("AgencyID")
<FONT color=red>Line 30: RS = Db.Execute(sSQL)
</FONT>The fact that you're getting unhandled exception messages indicates that Try/Catch is appropriate for your app. You're not going to be able to toss any data from inside the page that raised the exception into an error page without using Try/Catch. Try/Catch is a whole lot more friendly to deal with than the "On Error Goto Hell" from classic ASP.but the problem is i have around 50 pages that can return errors, and i dont have the time to modify all the pages. I need to modify the generic error page to send all variables oooorrr all the requests, i wish i could do the try catch thing but no luck on that, if there is a way to modify that screen it would be awsome
maybe in the server its hold in some file that i can at least at the requested data, please helpSorry, as far as I know, there's no way to get it done any quicker than with Try/Catch. Your best bet is to start with the most problematic pages and work through them until you get all the way through. 50 pages doesn't sound that bad, but if you've created a lot of functions on each page, then that could be a bit more of a hassle...
Ultimately, if you pull all the variable declarations in the Page_Load sub to the beginning, wrap the body of it with Try/Catch, and dump the variables of interest in the Catch (by, perhaps, stuffing all the text you want in a session variable, transferring to the error page, and then writing the content of the session variable), that might give you enough of what you need in the short term to keep a handle on things while cleaning things up further...Thanks for the idea ill have to revizit this because ihave a bunch of projects going on and i cant spend this much time to change all the screens
TY any wayYou're welcome. Just make sure to incorporate Try/Catch into new development, so you don't have an even bigger pile to deal with if you get time to go back and deal with the existing pages.i know i know it sucks to work for all these right now when i gets bigger its going to be a hell Ty
i was curious if there is a way to make the server return some variables when it crashes maybee all the variables maybe the requests,
i dont want to add try catch final stuff its not the best solution for my app, i just need in the return below make it show a list of variables and request is it possible? Thanks inadvance.
<SPAN>
<H1>Server Error in '/' Application.
<HR width="100%" color=silver SIZE=1>
</H1>
<H2><I>[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name
'qrqw'.</I> </H2></SPAN><FONT
face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "><B>Description:
</B>An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code. <BR><BR><B>Exception Details:
</B>System.Runtime.InteropServices.COMException: [Microsoft][ODBC SQL Server
Driver][SQL Server]Invalid column name 'qrqw'.<BR><BR><B>Source Error:</B>
<BR><BR>
<TABLE width="100%" bgColor=#ffffcc>
<TBODY>
<TR>
<TD><CODE><PRE>
Line 28: if not request("AgencyID") = "" then
Line 29: ssql="SELECT FTP, PassCode FROM Agency_Data WHERE agency = " & requestQuoteFIX("AgencyID")
<FONT color=red>Line 30: RS = Db.Execute(sSQL)
</FONT>The fact that you're getting unhandled exception messages indicates that Try/Catch is appropriate for your app. You're not going to be able to toss any data from inside the page that raised the exception into an error page without using Try/Catch. Try/Catch is a whole lot more friendly to deal with than the "On Error Goto Hell" from classic ASP.but the problem is i have around 50 pages that can return errors, and i dont have the time to modify all the pages. I need to modify the generic error page to send all variables oooorrr all the requests, i wish i could do the try catch thing but no luck on that, if there is a way to modify that screen it would be awsome
maybe in the server its hold in some file that i can at least at the requested data, please helpSorry, as far as I know, there's no way to get it done any quicker than with Try/Catch. Your best bet is to start with the most problematic pages and work through them until you get all the way through. 50 pages doesn't sound that bad, but if you've created a lot of functions on each page, then that could be a bit more of a hassle...
Ultimately, if you pull all the variable declarations in the Page_Load sub to the beginning, wrap the body of it with Try/Catch, and dump the variables of interest in the Catch (by, perhaps, stuffing all the text you want in a session variable, transferring to the error page, and then writing the content of the session variable), that might give you enough of what you need in the short term to keep a handle on things while cleaning things up further...Thanks for the idea ill have to revizit this because ihave a bunch of projects going on and i cant spend this much time to change all the screens
TY any wayYou're welcome. Just make sure to incorporate Try/Catch into new development, so you don't have an even bigger pile to deal with if you get time to go back and deal with the existing pages.i know i know it sucks to work for all these right now when i gets bigger its going to be a hell Ty