Well .. you have a couple of options in this case.
The easiest way IMO to track down an unhandled exception would be to start
the app in debug mode and to step thru the page/method/etc.. where you
believe the error is occurring. If you don't know, you can always start the
app by stepping into its first method. Depending on your chosen VS.NET
configuration, your function may be different then mine, but F11 is the one
I have mapped. This will allow you to examine each method as it executes.
Then you can advance the line-by-line execution with whatever your
'step-next' key is (mine is F9).
Another option you have is to enable tracing in the web.config file. Open
web.config and find the 'trace' element. Change the 'enabled' element's
value to "true". When the error occurs in your app, go to the url bar and
replace the <page_name>.aspx portion of the url with trace.axd. This is a
log of the requests made to the app by asp.net. Choose details of your last
request in the list and you should see some debugging info including the
error msg and the stacktrace of the error.
You can also add a TRACE switch to your app. This will log all trace info
to a file for review.
Based on the fact that the 'potentially dangerous Request.Form field ....'
error went away, my guess would be that the error you are seeing now is new
and unrelated to the original post.
If you can isolate the error to a specific page/call, why not post the code
or at least a stacktrace/ToString() of the exception.
Alex
"Tom" <ke*****@yahoo.com> wrote in message
news:66**********************************@microsof t.com...
Hi Alex,
I tried to add the validateRequest="false" to the page directive and the
error did not show now. However, the method does not work.
So, I want to know how to trace that error? There are some javascript in
the aspx page and the cs file uses object of other cs files.
I cannot trace the error incurred from Request.Form,
HttpRequestValidationException or idHidxml="<recordset><record>.
Is the error in aspx or the corresponding cs file? There is no way to
check the aspx file. But, the error incurs when I click that submit button
and it did not pass to the button method in cs file. How can I debug it now?
I do really want to find out that bug as this error happens in many aspx
pages.
Is there any method to debug the aspx? Can VS.net 2003 do it?
Thanks for your kind help.
Best regards,
Tom