关于在asp.net中上传文件 [英] about uploading files in asp.net

查看:76
本文介绍了关于在asp.net中上传文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个网站,当我在本地系统上工作时我需要上传文件,因为我无法从桌面上传文件,这不允许我上传.
当我使用假冒真实消息时,无法从桌面上载所有文件,但是当从其他系统调用同一应用程序并尝试执行相同的操作(不允许其他人使用)时,则我删除了假冒消息.

我的问题是上传时如何设置对文件的访问权限,就像我们处理邮件(网站)中的附件一样

Im developing a site where i need to upload the files when im working on my local system im not able to upload teh files from teh desktop, its not allowing me to upload.
when i use teh impersonate-true im able to upload all the files from teh desktop but when the same application is called from other system and try to do teh same its not allowing others, then i removed the impersonate.

my question is how to set access to the files when uploading, as we do with the attachment in our mail (web sites)

thanks in advance.

推荐答案

您的问题是权限之一.您会看到标准权限不允许匿名Web用户上传文件,主要是因为这样做会允许他们修改您的网站.

您有几种选择可解决此问题

  • 启用Windows身份验证并强制它们登录到有效帐户(我在这里假设是Windows上的IIS)
  • 设置隔离区,授予匿名Web用户写入权限,然后上传文件到该目录.
  • 将文件上传到数据库
Your problem is one of permissions. You see standard permissions don''t allow anonymous webusers to upload files, mainly because doing so would allow them to modify your website.

You have a few choices to fix this

  • Enable windows auth and force them to login to a valid account(I am assuming IIS on Windows here)
  • setup a quarantine area, give the anonymous web user rights to write to it, and upload the files to that directory.
  • upload your files to a database


如果可能的话,我可以提供解决方案.
If possible can u provide me teh solution how to do this.


这里是如何在数据库中存储文档(它实际上与哪种文档无关紧要).

http://www.codeproject.com/answers/61152/how-do-i-go-about-doing-the-code-for-storing-video.aspx#answer2
Here is how to store a document (it really doesn''t matter what kind of document it is) in a database.

http://www.codeproject.com/answers/61152/how-do-i-go-about-doing-the-code-for-storing-video.aspx#answer2


这篇关于关于在asp.net中上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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