2
Answers

Server.MapPath Showing error in .Netcore2.1

prasanna p

prasanna p

4y
4.8k
1
Hi Friends,
 
I am getting error server doen't exist in the current context in Server.MapPath in my .netcore Project.
 
I added System.Web,System.Web.Mvc,Microsoft.AspNetCore.Http  are there still getting Error.
 
I tried with the HttpContext.Current.Server.MapPath ---In this getting  error HttpContext doe's not contain definition for Current.
 
I tried with the HostinEnvironment.MapPath still getting error.
 
Please suggest me what is the exact solution to save file using Server.MapPath 
Answers (2)