Yah, I'm talking about server error. Let's say if I have array index out of bound, or anything other error. say if i'm trying to get a string that doesn't exist and assign to something else. It will print out the error with javascript instead of the yellow
page.
For example. I used to get an error from the following code in yellow page with error message "OleDbParameter with ParameterName '@ElgCategory' is not contained by this OleDbParameterCollection", but now I get it with javascript. In a different case, I try
to generate an server error by assign a variable that wasn't declared and I got the yellow page. So now i'm confused why sometimes is javascript and sometimes is yellow page.
public static bool GetCategory(out string elgCategory, out string elgTerm) {
string query = "CALL INTCUSTOM.PRODUCTRT";
OleDbConnection con = new OleDbConnection(ConfigurationManager.AppSettings["CONNECTION_STRING"]);
avmood
Member
493 Points
908 Posts
Re: custom error in web.config
May 22, 2008 10:23 PM|LINK
Yah, I'm talking about server error. Let's say if I have array index out of bound, or anything other error. say if i'm trying to get a string that doesn't exist and assign to something else. It will print out the error with javascript instead of the yellow page.
holliday_jd
Member
412 Points
102 Posts
Re: custom error in web.config
May 23, 2008 12:03 AM|LINK
That means the error is occuring on the client not server. If you could post some code I code help more.
avmood
Member
493 Points
908 Posts
Re: custom error in web.config
May 23, 2008 12:21 AM|LINK
thanks, I will post it tomorrow as I don't have access to the code at home.
avmood
Member
493 Points
908 Posts
Re: custom error in web.config
May 23, 2008 01:02 PM|LINK
For example. I used to get an error from the following code in yellow page with error message "OleDbParameter with ParameterName '@ElgCategory' is not contained by this OleDbParameterCollection", but now I get it with javascript. In a different case, I try to generate an server error by assign a variable that wasn't declared and I got the yellow page. So now i'm confused why sometimes is javascript and sometimes is yellow page.
public static bool GetCategory(out string elgCategory, out string elgTerm) {
string query = "CALL INTCUSTOM.PRODUCTRT";
OleDbConnection con = new OleDbConnection(ConfigurationManager.AppSettings["CONNECTION_STRING"]);
OleDbCommand comm = new OleDbCommand(query, con);
comm.CommandType = CommandType.StoredProcedure;
comm.Parameters.Add("@ElgCategory", OleDbType.Char, 1);
comm.Parameters["@ElgCategory"].Direction = ParameterDirection.Output;
comm.Parameters.Add("@UnitInfo", OleDbType.Decimal);
comm.Parameters["@UnitInfo"].Direction = ParameterDirection.Output;
try
{
con.Open();
comm.ExecuteNonQuery();
}
catch (Exception ex)
{
throw new Exception("DataAccess.GetData", ex);
}
finally
{
con.Close();
comm.Dispose();
}
elgCategory = comm.Parameters["@ElgCategory"].Value.ToString();
elgTerm = comm.Parameters["@UnitInfo"].Value).ToString()
if (elgCategory != String.Empty)
{
return true;
}
else
{
return false;
}
}
holliday_jd
Member
412 Points
102 Posts
Re: custom error in web.config
May 23, 2008 02:01 PM|LINK
Is this code being called on a partial postback via an updatepanel? If yes, it is starting to make sense now.
See if this link helps with the AJAX debugging settings...
http://msdn.microsoft.com/en-us/library/bb398817.aspx
avmood
Member
493 Points
908 Posts
Re: custom error in web.config
May 23, 2008 02:27 PM|LINK
yes, the code is within updatepanel, so is it means it has to do with the ajax enabled site?
holliday_jd
Member
412 Points
102 Posts
Re: custom error in web.config
May 23, 2008 07:04 PM|LINK
did you have a look at that link?
avmood
Member
493 Points
908 Posts
Re: custom error in web.config
May 23, 2008 07:06 PM|LINK
I didn't realize that you put a link. I will check it out.
wadha dia
Member
2 Points
1 Post
Re: custom error in web.config
Jul 25, 2010 10:29 AM|LINK
Hi , i'am trying to go to the weltec , where they do courses , in wellington but there is a rutine errors , in a yellow page. thanks wadha