Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
1.60/5 (2 votes)
See more:
Suppose IIS has "mappeddirectoryfoldername" as the folder name to which some path on the network is mapped not similiar to the application path so how can I get that path?


Server.MapPath("mappeddirectoryfoldername")



is not working for me
Posted
Comments
Arkadeep De 19-Jun-15 4:54am    
can you explain little bit more?
may be you are looking for this one.
Server.MapPath("~/mappeddirectoryfoldername/")
VipinKumar Maurya 19-Jun-15 5:00am    
this is what i was looking for..thanks

1 solution

In order to get the virtual path to the folder you need to specify the path from the root folder like below:

Try using
Server.MapPath("~/mappeddirectoryfoldername/")
 
Share this answer
 

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