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: 
You can get the base path by using the following code and append your needed path with that.

```
string  path = System.AppDomain.CurrentDomain.BaseDirectory;

```
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.