Posts Tagged ‘HttpContext in a C#.NET class library’

When I faced this problem, I hardly find proper solution on net (May be my search keywords are not capable of finding proper solution). So, I decided to let everybody know how we can use HttpContext and Server.MapPath in a C# class library. You can also use Session, and Application State, Server, Request and Response objects by just adding reference of System.Web.dll from .NET framework into your C# library Reference and include that namespace in your class file at the beginning like:

using System.Web;

Whether you found this article useful or not? please provide your valuable comments.