私は自分のアプリケーションで使用mutex
したことがなく、それが何をするのかわかりませんが、私の Web アプリケーションは次の例外をスローし、それを処理する方法がわかりません:
IP: System.Web.HttpApplicationState
07/16/2012 10:06:01
Error in: https://-------/Loginpage.aspx
Error Message:Error in:https://--------/Loginpage.aspx Error Message:The wait completed due to an abandoned mutex. Stack Trace : at System.Threading.WaitHandle.WaitOne(Int64 timeout, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne(Int32 millisecondsTimeout, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne()
at IBM.Data.Informix.IfxConnection.GetLatch(String callerMsg)
at IBM.Data.Informix.IfxCommand.ExecuteReaderObject(CommandBehavior behavior, String method)
at IBM.Data.Informix.IfxCommand.ExecuteReader(CommandBehavior behavior)
at IBM.Data.Informix.IfxCommand.ExecuteReader()
at DB_Connection_s.DB_Connection.IsValidPortalUser(String p_u, String p_p)
at LoginSystem.LoginPage.ValidateUser(String UserName, String Password) in H:\LoginSystem\LoginSystem\LoginPage.aspx.cs:line 21
at LoginSystem.LoginPage.ibtn_login_Click(Object sender, ImageClickEventArgs e) in H:\LoginSystem\LoginSystem\LoginPage.aspx.cs:line 34
at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
public static int IsValidPortalUser(string p_u, string p_p) {
string str = DB_Connection.My_Decryption_2(p_p);
int item = 0;
try
{
if (DB_Connection.conn.State == 0)
{
DB_Connection.conn.Open();
}
DB_Connection.DBCmd = new IfxCommand();
DB_Connection.DBCmd.Connection = DB_Connection.conn;
DB_Connection.DBCmd.CommandText = "SELECT nvl(emp_num,0) FROM htoemp WHERE username = ? AND DECRYPT_CHAR(password, '78dfdf') = ? ";
DB_Connection.DBCmd.Parameters.Add("user_name", p_u);
DB_Connection.DBCmd.Parameters.Add("password", str);
IfxDataReader ifxDataReaders = DB_Connection.DBCmd.ExecuteReader();
if (ifxDataReaders.Read())
{
item = (int)ifxDataReaders[0];
}
ifxDataReaders.Close();
}
catch (ApplicationException applicationException)
{
}
DB_Connection.conn.Close();
return item;
}
この問題を解決するには?