0 Comments

 

The following code result in my case to rootFolderPath = "C:\inetpub\wwwroot\MvcApplication1".

Uri uri = new System.Uri(Assembly.GetAssembly(typeof(MvcApplication)).CodeBase);
string binFolderPath = Path.GetDirectoryName(uri.LocalPath);
string rootFolderPath = new DirectoryInfo(binFolderPath).Parent.FullName;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts