M
Muhammad Ahsin Saleem
Hi Everybody,
I have my site xyz.com.pk hosted on a domain, also there is another
subdomain hosted as admin.xyz.com.pk.
I have a form in the admin subdomain that wants to save a file in the
xyz.com.pk subdomain. I am having a problem with the path of file. I
have used the following code
Dim filename As String =
Server.MapPath("../xyz.com.pk/myfolder/myfile.xml")
but it gives the following exception
An Exception has Occured.System.Web.HttpException: Cannot use a leading
... to exit above the top directory. at
System.Web.Util.UrlPath.ReduceVirtualPath(String path) at
System.Web.Util.UrlPath.Reduce(String path) at
System.Web.Util.UrlPath.Combine(String appPath, String basepath, String
relative) at System.Web.VirtualPath.Combine(VirtualPath relativePath)
at System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath
baseVirtualDir, Boolean allowCrossAppMapping) at
System.Web.HttpServerUtility.MapPath(String path)
Can anybody help me to solve this problem.
I need an urgant response
Thanx in advance.
I have my site xyz.com.pk hosted on a domain, also there is another
subdomain hosted as admin.xyz.com.pk.
I have a form in the admin subdomain that wants to save a file in the
xyz.com.pk subdomain. I am having a problem with the path of file. I
have used the following code
Dim filename As String =
Server.MapPath("../xyz.com.pk/myfolder/myfile.xml")
but it gives the following exception
An Exception has Occured.System.Web.HttpException: Cannot use a leading
... to exit above the top directory. at
System.Web.Util.UrlPath.ReduceVirtualPath(String path) at
System.Web.Util.UrlPath.Reduce(String path) at
System.Web.Util.UrlPath.Combine(String appPath, String basepath, String
relative) at System.Web.VirtualPath.Combine(VirtualPath relativePath)
at System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath
baseVirtualDir, Boolean allowCrossAppMapping) at
System.Web.HttpServerUtility.MapPath(String path)
Can anybody help me to solve this problem.
I need an urgant response
Thanx in advance.