i face a problem that server.mappath did not available in c# class at my utillity framework at app code folder of one of my asp.net application. While it is available at asp.net page code behind. Because ASP.NET pages contain a default reference to the System.Web namespace (which contains the
HttpContext class), you can reference the members of HttpContext on an .aspx
page without the fully qualified class reference to HttpContext.
For using Server.MapPath at C# class i used it following
System.Web.HttpContext.Current.Server.MapPath(logpath);