R
Roel
Hello
I'm having two strange errors in a webapplication I'm developping.
Error one:
If have an IF-clause. When the expression is true, the program does not only
executes the if-part, it also executes a part of the else clause...
Error two:
When the if clause is true, I redirect the user to another page
-> Response.Redirect("../../app/start.aspx");
On this line the program goes to the catch - part.... and give the following
error:
Message:
Thread was being aborted.
Source:
mscorlib
This is the code:
if(User.Validate())
{
Session.Timeout = 10;
Session["UserName"] = User.gsUsername;
User = null;
sBuilderPassWord = null;
sBuilderUserName = null;
Response.Redirect("../../app/start.aspx");
}
else
{
User = null;
sBuilderPassWord = null;
sBuilderUserName = null;
lblLogin.Text = "Verkeerde gebuikersnaam of paswoord.";
}
}
catch(Exception ex)
{
Response.Redirect ("../../app/error.aspx?errsource=" + ex.Source +
"&errmsg=" + ex.Message + "&errstack=" + ex.StackTrace);
}
Many thanks for your help
Roel
I'm having two strange errors in a webapplication I'm developping.
Error one:
If have an IF-clause. When the expression is true, the program does not only
executes the if-part, it also executes a part of the else clause...
Error two:
When the if clause is true, I redirect the user to another page
-> Response.Redirect("../../app/start.aspx");
On this line the program goes to the catch - part.... and give the following
error:
Message:
Thread was being aborted.
Source:
mscorlib
This is the code:
if(User.Validate())
{
Session.Timeout = 10;
Session["UserName"] = User.gsUsername;
User = null;
sBuilderPassWord = null;
sBuilderUserName = null;
Response.Redirect("../../app/start.aspx");
}
else
{
User = null;
sBuilderPassWord = null;
sBuilderUserName = null;
lblLogin.Text = "Verkeerde gebuikersnaam of paswoord.";
}
}
catch(Exception ex)
{
Response.Redirect ("../../app/error.aspx?errsource=" + ex.Source +
"&errmsg=" + ex.Message + "&errstack=" + ex.StackTrace);
}
Many thanks for your help
Roel