Geekpedia Forums Logo

Low disk space?

by venkatesh padmanabhan on Monday, November 19th - 3:56 AM



Hi..

I have a website (ASP.NET 2.0+C#+SQL Server 2000) published on the server. The server's disk space runs out and so the website is no longer viewable to the user. I would like to provide a custom message to the user, if the server space is low.

 How to provide the customized message to the user, incase the disk space on the primary drive( c:\) runs out?

Please help.

Thank You.

It's very simple, just use:

System.IO.DriveInfo drvC = new System.IO.DriveInfo("c");
drvC.TotalFreeSpace // check when this value is small

Thank you very much for the reply.

But where should I check this?

When the disk space is low, the home page itself does not gets loaded.

Thank you