c# - How to get physical directory path to path created by server? -


i have asp.net mvc web application deployed server. app has exe file keep in known parent directory on local machine , call using mappath this:

string path = httpcontext.current.server.mappath("~/parentdirectory/");. 

the problem is, server deploy to, doesn't keep file in same directory , therefore have no way of calling during compile time using method. there way can call exe file dynamically name or way server's path?

your best option use appsetting in web.config file , have server admin add path when application deployed.


Comments