开发者

How to configure web.config to support file handler

开发者 https://www.devze.com 2023-01-29 10:25 出处:网络
I created a f开发者_如何学Goile browser control which open files on client machine itself, so I don\'t need to bother about file path

I created a f开发者_如何学Goile browser control which open files on client machine itself, so I don't need to bother about file path

from my application I am not able to redirect page to

file:///C:/Program%20Files/Application/readme.txt

it works for

http://

how can I configure my application to support file handler.

Thanx


If you are trying to redirect to a local file. This is not possible without knowing quite a lot of information on the client machine - for example how do you know the directory structure of the client computer?

Response.Redirect tells the client (browser) where to redirect to. A file URL will be one that is on the client machine - you would need to know in advance that the file is there, that the user has permissions to view it etc...


Are you asking how to send a file from the server?

You can do this via Response.WriteFile.

0

精彩评论

暂无评论...
验证码 换一张
取 消