Re: How get the virtual path based on the physical path?

Tech-Archive recommends: Fix windows errors by optimizing your registry



On 13 , 14:59, marss <marss...@xxxxxxxxx> wrote:
Server.MapPath("~/page.aspx") returns the physical file path based on
the specified virtual path. Is there any reverse method to get the
virtual path based on the physical path (both pathes belong to the
same web application)?

Or, maybe, anyone know how to get virtual files pathes in some virtual
directory without casting the directory virtual path to phisical
path.
I mean without this: System.IO.Directory.GetFiles(Server.MapPath("~/
images"))
Mykola
http://marss.co.ua

.



Relevant Pages

  • Re: Getting list of the files from a virtual directory
    ... Is this OutPic or OutSrc as you named it in IIS according to your first post ... but the real physical path is "C:\Media\Banners" and the virtual path ... Sorry bu i don't understand that how can i convert the virtual path to ... For my default project directory, i can get list of the specific files ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Relative path to Access database in .net 2
    ... Data Source value should be a physical path rather ... >than a virtual path. ... Hi Elton. ... I want to use a relative path, because the path to the database differ ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Cannot use a leading .. to exit above the top directory.
    ... The MapPath method maps a relative or virtual path to a physical path. ... > 'private', which is where my host recommend storing application data. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How get the virtual path based on the physical path?
    ... Juan T. Llibre, asp.net MVP ... virtual path based on the physical path (both pathes belong to the ... Or, maybe, anyone know how to get virtual files pathes in some virtual ... directory without casting the directory virtual path to phisical ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Error: Could not find a part of the path / Reading and Writing to files in ASP.Net
    ... Request.ApplicationPath will return a virtual path string like ... StreamReader require a physical path like ...
    (microsoft.public.dotnet.framework.aspnet)