Hi
I am getting error - Cannot convert from string[] to System.Exception
var errors = query.ToArray();
ExceptionLogging.SendExcepToDB(errors);
public static void SendExcepToDB(Exception exdb)
{
connecttion();
exepurl = HttpContext.Current.Request.Url.ToString();
SqlCommand com = new SqlCommand("ExceptionLoggingToDataBase", con);
com.CommandType = CommandType.StoredProcedure;
com.Parameters.AddWithValue("@ExceptionMsg", exdb.Message.ToString());
com.Parameters.AddWithValue("@ExceptionType", exdb.GetType().Name.ToString());
com.Parameters.AddWithValue("@ExceptionURL", exepurl);
com.Parameters.AddWithValue("@ExceptionSource", exdb.StackTrace.ToString());
com.ExecuteNonQuery();
}
Thanks
Sachin SinghPosted Jun 16, 2021, 7:54 AM
Ramco RamcoPosted Jun 16, 2021, 7:39 AM
Sachin SinghPosted Jun 16, 2021, 7:35 AM