How can I get the physical path from a virtual path in asp.net core? -


in asp.net, have used server.mappath() method physical path. in core, can't that, have used ihostingenvironment, can wwwroot path.

use hostingenvironment.mappath bellow

hostingenvironment.mappath("~/page.aspx") 

or root folder path

hostingenvironment.mappath("/") 

Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -