prasanna p

prasanna p

  • 1.2k
  • 470
  • 102k

Server.MapPath Showing error in .Netcore2.1

Apr 3 2020 6:26 AM
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)