Re: Absolute path to url?



re:
A virtual path is expected.
The path is right. How to fix it?

No. The path is *not* right.
Your web users will never find a path in your file system.

You need to use a virtual path which your web users can access.




Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"js" <js@someone@hotmail.com> wrote in message news:ucnG63qVGHA.4724@xxxxxxxxxxxxxxxxxxxxxxx
Thanks Steven,

I got this error:
Invalid path for child request 'C:\MyServer\Users\debug\Portals\0\Users\host\Hello1.doc'. A
virtual path is expected.

The path is right. How to fix it?



"Steven" <StevenSw@xxxxxxxxxxxxxxxx> wrote in message
news:B38C8D2D-EDB9-4160-8EB2-BE7CAE10CC82@xxxxxxxxxxxxxxxx
Have you tried: Server.Transfer(fileName, True)

"js" wrote:

Hi,

I have stored the absolute file path in a grid, and want if user click it,
will redirect to the virtual path and download the file:

Dim fileName As String = articleList.DataKeys(e.Item.ItemIndex)

Response.Redirect(fileName, True)



But failed, how to recirect to the link? Thanks.









.



Relevant Pages

  • Secure shared web hosting using MAC Framework
    ... To make things clear I will call the hosted users "web users". ... Those rights should have priority on any traditional unix file system rights. ... For the user's own security, prevent them from writing to /tmp ...
    (FreeBSD-Security)
  • Secure shared web hosting using MAC Framework
    ... To make things clear I will call the hosted users "web users". ... Those rights should have priority on any traditional unix file system rights. ... For the user's own security, prevent them from writing to /tmp ...
    (FreeBSD-Security)
  • Re: Replacing files on a IIS Web Server
    ... >I simply try to copy the file on the file system, ... >locked by web users. ... It has a retry you can set if ... Jeff ...
    (microsoft.public.inetserver.misc)