Click here to Skip to main content
15,891,633 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get website path in IIS
Example: www.example.com
i want path = c:/example
Posted

1 solution

Server.MapPath[^] will turn your virtual path into server file path.

If this helps please take time to accept the solution. Thank you.
 
Share this answer
 
Comments
vr reddy 28-Nov-14 6:31am    
i want iis path using site name
Sinisa Hajnal 28-Nov-14 6:47am    
Why don't you read it before you comment. Use Server.MapPath("/") to get your physical domain path.
[no name] 28-Nov-14 6:55am    
You meant you physical path in Server ? Where it is hosted ?
Sinisa Hajnal 28-Nov-14 7:38am    
Yes, that is what you asked for isn't it? If you browse default web site and ask for Server.MapPath ("/") you'll get C:\InetPub\wwwroot ON THE SERVER.
Sinisa Hajnal 28-Nov-14 7:40am    
Ah...you want application path? Not server path? That is, you want your application subdirectory? Try with Server.MapPath("~") if that is so.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900