Click here to Skip to main content
15,903,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
In my application I have used server.mappath(~); for virtual path. But client machine firewall is blocking ~ sign. So which alternative should I use for virtual path?
Posted

1 solution

You can use an alternatives as:-

C#
string CustName = UserInformation.Rows[0]["TXT_Name"].ToString();
string deviceLogoPath = string.Format("../MapImages/DocFile/{0}", CustName);
                    if (Directory.Exists(Server.MapPath(deviceLogoPath)))
                    {
                        string existFile = Server.MapPath(string.Format("{0}/{1}", deviceLogoPath, deviceLogo.Trim()));
}



you can use ".." for virtual path instead of "~"
 
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