February 10, 2016

Server.MapPath in Class Library C#

If you are using “Server.MapPath”  in assembly project, it will show you compilation error in application.To get rid of this issue, use “System.Web.HttpContext.Current.Server.MapPath” instead of “Server.MapPath”. You have to reference System.Web in your project.

No comments:

Post a Comment