D
Deepika
Hello,
I am trying to trap the invalid_viewstate error in my application so
that an error email does not get sent.
In my global.asax under Application_Error:
Exception ex=Server.GetLastError();
if(ex.ToString().IndexOf("Invalid_Viewstate_Client_Disconnected") ==
-1)
{
send error email }
else
{
don't send error email }
I have tried using server.getlasterror().getbaseexception() and
ex.message just to make sure that I was not searching in incomplete
error message
However I still get error email for invalid_viewstate error.
Please can somebody point why indexof is not able to find the string
with in the error message?
Thanks,
Deepika
I am trying to trap the invalid_viewstate error in my application so
that an error email does not get sent.
In my global.asax under Application_Error:
Exception ex=Server.GetLastError();
if(ex.ToString().IndexOf("Invalid_Viewstate_Client_Disconnected") ==
-1)
{
send error email }
else
{
don't send error email }
I have tried using server.getlasterror().getbaseexception() and
ex.message just to make sure that I was not searching in incomplete
error message
However I still get error email for invalid_viewstate error.
Please can somebody point why indexof is not able to find the string
with in the error message?
Thanks,
Deepika