SyntaxFix
Write A Post
Hire A Developer
Questions
Try HostingEnvironment.MapPath, which is static.
HostingEnvironment.MapPath
static
See this SO question for confirmation that HostingEnvironment.MapPath returns the same value as Server.MapPath: What is the difference between Server.MapPath and HostingEnvironment.MapPath?
Server.MapPath