在asp.net中上传文件 [英] upload a file in asp.net

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

问题描述

iam通常上传文件时会上传文件

但是使用iis会显示一个错误,拒绝访问路径如何纠正它

when iam normaly upload a file it is uploaded

but using iis it shows an error that is access to path is denied how to rectify it

推荐答案

这取决于. IIS尝试访问的唯一路径是服务器上.您是否将文件保存在网站的根目录中?如果没有,则需要.如果是,那么您需要告诉我们确切的错误,包括路径,导致错误的代码等.
It depends. The only path that IIS would try to access, is on the server. Are you saving your files inside the root directory of your website ? If not, you need to. If you are, then you need to tell us the exact error, including the path, what code creates the error, etc.


您今天早些时候曾问过此问题:
对路径的访问被拒绝 [
You asked about this earlier today:
Access to the path is denied[^]

Take a look at the comments - you need to set this up so that the IIS user have write access to a folder, and still provide adequately for sequrity.

Best regards
Espen Harlinn


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

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