I am developing an Web Api2 Solution. It has a main Project, and other projects.
My main Project is in path
C:/Prj/mainProj
Other Project is in path
C:/Prj/Services
From the main Controller in main Project, I call a method in Services Project, where I need to read a file that is under Services directory.
I am using
AppDomain.CurrentDomain.BaseDirectory;
or
System.Web.HttpRuntime.AppDomainAppPath;
but it retrieves main Project path (C:/Prj/mainProj)
how can i retrieve current Project path?
C:/Prj/Services
Aucun commentaire:
Enregistrer un commentaire