Question: How can i use the server.mappath method in a C# class library class ,which acts as my BusinessLayer for My ASP.NET WEbsite

Answer: 
By calling it?

```
var path = System.Web.HttpContext.Current.Server.MapPath("default.aspx");

```

Make sure you add a reference to the System.Web assembly.
Use this [System.Web.Hosting.HostingEnvironment.MapPath()](https://msdn.microsoft.com/en-us/library/system.web.hosting.hostingenvironment.mappath.aspx).

```
HostingEnvironment.MapPath("~/file")

```

Wonder why nobody mentioned it here.