Where can I find System.Web.HttpContext.Current.Server dll?

Sivakumar Piratheeban picture Sivakumar Piratheeban · Dec 2, 2014 · Viewed 10.7k times · Source

Where can I find System.Web.HttpContext.Current.Server dll. I want to use Server.MapPath() in my code and it requires System.Web.HttpContext.Current.Server namespace. Even from references I couldn't find and add System.Web.HttpContext.Current.Server to my solution. Any help?

Answer

Ehsan Sajjad picture Ehsan Sajjad · Dec 2, 2014

Right Click References >> then click Add Reference and Under Assemblies click Framework and Search System.Web and check the checkbox and click OK button to add it's reference in your project:

enter image description here

You have reference of System.Web now and Now you can use all Types and methods which are under System.Web namespace/assembly it, in your case HttpContext:

System.Web.HttpContext