How to get path 'C:\inetpub\wwwroot\wss\VirtualDirectories' at run-time in installer class (c#) -


i have created below code not give actual result want. code:-

 servermanager manager = new servermanager();  site defaultsite = manager.sites["default web site"];  string path = manager.sites[0].applications["/"].virtualdirectories["/"].physicalpath; 

output:-

the above code give result '%systemdrive%\inetpub\wwwroot' instade of want actual path 'c:\inetpub\wwwroot\wss\virtualdirectories'.

please me possible.

thanks in advance.

path = environment.expandenvironmentvariables(path); 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -