Hello All,
I am trying to add a clean up code to the global.asax file, when I initially added the code it worked but now its throwing a compilation error for the same. Below is the code which I need to add, I have taken it from Microsoft's website and there its mentioned its valid for .NET 1.1, so I would like to know if anybody can help with the replacement of this for .NET 2.0
<%@ Application Language="c#" %>
<%@ Import Namespace="ServiceNameSpace" %>
<script runat=server>
protected void Session_Start(object sender, EventArgs e)
{
//this is needed so we don't generate a new session with each request
Session["valid"] = true;
}
protected void Session_End(Object sender, EventArgs e)
{
TempDataStore.Remove(Session.SessionID);
}
protected void Application_End(Object sender, EventArgs e)
{
TempDataStore.ClearAll();
}
</script>