Session.Abandon(); fires following Exception due to wrong SQL Syntax:
.NET Reflector gives the following output for this function:[MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM aspnet_sessions WHERE sessionid = 'abj4im55kh1yuh45gqion545' AND applicat' at line 1]
CoreLab.Common.Web.Providers.DbSessionStateStore.RemoveItem(HttpContext context, String id, Object lockId, SessionStateStoreData item) +387
System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +434
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +167
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +117
Code: Select all
public override void RemoveItem(HttpContext context, string id, object lockId, SessionStateStoreData item)
{
DbConnection connection1 = this.i.CreateConnection();
connection1.ConnectionString = this.b;
IDbCommand command1 = this.a("DELETE * FROM aspnet_sessions WHERE sessionid = :sessionid AND applicationname = :applicationname AND lockid = :lockid", connection1);
command1.Parameters.Add(this.a("sessionid", DbType.String, 80, id));
command1.Parameters.Add(this.a("applicationname", DbType.String, 0xff, this.ApplicationName));
command1.Parameters.Add(this.a("lockid", DbType.Int32, lockId));
try
{
connection1.Open();
command1.ExecuteNonQuery();
}
catch (Exception exception1)
{
if (this.WriteExceptionsToEventLog)
{
this.a(exception1, "RemoveItem");
throw new ProviderException(this.g);
}
throw exception1;
}
finally
{
connection1.Close();
}
}
I think that "DELETE * FROM tablename..." is wrong syntax. It must be "DELETE FROM tablename...".
Please fix that bug asap, 'cause we need it for our web projects.
regards
Kai Korla
INDEV