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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -