Hi..
I have a web application in VS2005( C#). The user can review records through the web application. Every time a record is reviewed it creates a folder in inetmgr under web application folder. So if the user reviewed thousands of records, this is going to be disastrous.
How to do the house keeping of the records?
In the Global.asax file, I have written as:
void Application_Start(object sender, EventArgs e)
{
// to get the path for MP3Downloads folder
Application["MP3DOWNLOADSFolderPath"] = Server.MapPath("~/MP3DOWNLOADS//");
}
void Session_End(object sender, EventArgs e)
{
string MP3DOWNLOADSFolderName = Application["MP3DOWNLOADSFolderPath"].ToString() + Session.SessionID.ToString();
if (System.IO.Directory.Exists(MP3DOWNLOADSFolderName))
{
System.IO.Directory.Delete(MP3DOWNLOADSFolderName, true);
if (System.IO.Directory.Exists(MP3DOWNLOADSFolderName))
{
System.IO.Directory.Delete(MP3DOWNLOADSFolderName);
}
}
}
When I used the above code, I am facing the problem of the IIS getting re-started. Another thing is,if one of the users encounter any error, and when the user logs out, the other users are also gettng logged out..
How to do the house keeping of the records?
Please help.. Thanks