下载问题 [英] Download question

查看:55
本文介绍了下载问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在为一家公司开发一个网站,这个网站将有文件可用

供客户下载,但只有客户才能下载能够下载这些文件的
和每个客户的可用文件

取决于客户的类型。


so如何通过输入完整的URL来阻止用户下载文件

(例如, http://www.company.com/file.exe


如果用户输入文件的url,我想要用户重定向到

登录页面。


**一些文件大于50MB


谢谢

Hi,
I am developing a site for a company and this site will have files available
for the customers to download, but only the customers loged in will be able
to download these files and the files availables for each customer will
depend on the type of the customer.

so how can I prevent a user from downloading a file by typing the full url
(example, http://www.company.com/file.exe)

if the user type the url of the file, I want the user to be redirected to
the login page.

**some files are larger than 50MB

Thanks

推荐答案

2004年8月7日星期六00:48:42 -0300,The Clansman< no@pls.com>写道:
On Sat, 7 Aug 2004 00:48:42 -0300, The Clansman <no@pls.com> wrote:

我正在为一家公司开发一个网站,这个网站将有文件可用
供客户下载,但是只有客户能够下载这些文件才能下载这些文件,每个客户可用的文件将取决于客户的类型。

所以如何我可以通过输入完整的URL来阻止用户下载文件
(例如, http://www.company.com/file.exe )如果用户输入文件的url,我希望将用户重定向到< br。>登录页面。

**一些文件大于50MB

Hi,
I am developing a site for a company and this site will have files
available
for the customers to download, but only the customers loged in will be
able
to download these files and the files availables for each customer will
depend on the type of the customer.

so how can I prevent a user from downloading a file by typing the full
url
(example, http://www.company.com/file.exe)

if the user type the url of the file, I want the user to be redirected to
the login page.

**some files are larger than 50MB

Thanks




最简单的方法是将所有文件的扩展名映射到IIS中的aspnet dll

。因此,请进入IIS中的Web应用程序,并将.aspx

的dll设置复制到其他每个(.exe,pdf等)。这将导致通过aspnet进程传递请求
(这将只提供

文件),使您能够通过表单身份验证保护它们。


注意你会想稍微测试一下,以确保没有问题。

性能影响也应该是最小的。


-

Craig Deelsnyder

Microsoft MVP - ASP / ASP.NET



The easiest way is to map all of the files'' extensions to the aspnet dll
in IIS. So go into your web app in IIS and copy the dll setting for .aspx
to each of the other ones (.exe, pdf, etc.). This will cause requests to
be passed thru the aspnet process (which will then just serve up the
file), enabling you to protect them via Forms Authentication.

Note you''ll want to test this a little, to make sure of no problems.
Performance impact should be minimal as well.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET


谢谢,

但是我正在使用托管服务,网络服务器不是我有的服务器

访问....


可以在托管服务器上配置吗?


谢谢


Craig Deelsnyder < cdeelsny@no_spam_4_meyahoo.com>在消息中写道

news:opsccmo2w475dg5d @ cowboy ...
thanks,
but I''m using a hosting service, the web server is not a server that I have
access....

is it possible to configure this at the hosting server?

thanks

"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message
news:opsccmo2w475dg5d@cowboy...
2004年8月7日星期六00:48:42 -0300,The Clansman< no@pls.com> ;写道:
On Sat, 7 Aug 2004 00:48:42 -0300, The Clansman <no@pls.com> wrote:

我正在为一家公司开发一个网站,这个网站将有文件可用
供客户下载,但是只有客户能够下载这些文件才能下载这些文件,每个客户可用的文件将取决于客户的类型。

所以如何我可以通过输入完整的URL来阻止用户下载文件
(例如, http://www.company.com/file.exe )如果用户输入文件的url,我希望用户被重定向
到登录页面。

**一些文件大于50MB
谢谢
Hi,
I am developing a site for a company and this site will have files
available
for the customers to download, but only the customers loged in will be
able
to download these files and the files availables for each customer will
depend on the type of the customer.

so how can I prevent a user from downloading a file by typing the full
url
(example, http://www.company.com/file.exe)

if the user type the url of the file, I want the user to be redirected to the login page.

**some files are larger than 50MB

Thanks



最简单方法是将所有文件的扩展名映射到IIS中的aspnet dll
。因此,请进入IIS中的Web应用程序,并将.aspx
的dll设置复制到其他每个(.exe,pdf等)。这将导致请求通过aspnet进程传递(然后只会提供
文件),使您能够通过表单身份验证保护它们。

请注意你我想稍微测试一下,以确保没有问题。
性能影响也应该是最小的。

-
Craig Deelsnyder
Microsoft MVP - ASP / ASP.NET



The easiest way is to map all of the files'' extensions to the aspnet dll
in IIS. So go into your web app in IIS and copy the dll setting for .aspx
to each of the other ones (.exe, pdf, etc.). This will cause requests to
be passed thru the aspnet process (which will then just serve up the
file), enabling you to protect them via Forms Authentication.

Note you''ll want to test this a little, to make sure of no problems.
Performance impact should be minimal as well.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET



我的建议是二进制读取并呈现给客户端,以便

用户永远不会看到文件网址。


Sekhar。

The Clansman < no@pls.com>在消息中写道

新闻:uf ************* @ TK2MSFTNGP11.phx.gbl ...
My suggestion would be to binary read and render to client such that the
users will never get to see the file url.

Sekhar.
"The Clansman" <no@pls.com> wrote in message
news:uf*************@TK2MSFTNGP11.phx.gbl...
谢谢,
但是我正在使用托管服务,网络服务器不是我b $ b可以访问的服务器....

是否可以在托管服务器上配置它?

感谢

Craig Deelsnyder < cdeelsny@no_spam_4_meyahoo.com>在消息中写道
新闻:opsccmo2w475dg5d @ cowboy ...
thanks,
but I''m using a hosting service, the web server is not a server that I have access....

is it possible to configure this at the hosting server?

thanks

"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message
news:opsccmo2w475dg5d@cowboy...
2004年8月7日星期六00:48:42 -0300,The Clansman< no@pls.com>写道:
On Sat, 7 Aug 2004 00:48:42 -0300, The Clansman <no@pls.com> wrote:

我正在为一家公司开发一个网站,这个网站将有文件可用
供客户下载,但是只有客户才能下载这些文件,每个客户可用的文件
将取决于客户的类型。

如何我可以通过输入完整的URL来阻止用户下载文件
(例如, http://www.company.com/file.exe )如果用户输入文件的url,我希望将用户重定向到登录页面。

**一些文件大于50MB

Hi,
I am developing a site for a company and this site will have files
available
for the customers to download, but only the customers loged in will be
able
to download these files and the files availables for each customer will depend on the type of the customer.

so how can I prevent a user from downloading a file by typing the full
url
(example, http://www.company.com/file.exe)

if the user type the url of the file, I want the user to be redirected to the login page.

**some files are larger than 50MB

Thanks



最简单的方法是映射IIS中所有文件对aspnet dll的扩展
。因此,进入IIS中的Web应用程序并将
..aspx的dll设置复制到其他每个(.exe,pdf等)。这将导致请求
通过aspnet进程传递(这将只提供
文件),使您能够通过表单身份验证保护它们。

请注意你我想稍微测试一下,以确保没有问题。
性能影响也应该是最小的。

-
Craig Deelsnyder
Microsoft MVP - ASP / ASP.NET



The easiest way is to map all of the files'' extensions to the aspnet dll
in IIS. So go into your web app in IIS and copy the dll setting for ..aspx to each of the other ones (.exe, pdf, etc.). This will cause requests to be passed thru the aspnet process (which will then just serve up the
file), enabling you to protect them via Forms Authentication.

Note you''ll want to test this a little, to make sure of no problems.
Performance impact should be minimal as well.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET




这篇关于下载问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆