asp.net FileUpload控件问题:访问目录被拒绝 [英] asp.net FileUpload control problem: access to directory is denied

查看:90
本文介绍了asp.net FileUpload控件问题:访问目录被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试着使用FileUpload控件。即时通讯使用我的桌面上的Visual Web Developer防爆preSS。

Im trying to use the fileupload control. Im using Visual Web Developer Express on my desktop.

我的Web应用程序工作正常,但我不能使用FileUpload控件。我收到以下错误:

My web application is working fine except I cant use the fileUpload control. I get the following error:

错误:访问路径(My_Directory)将被拒绝。

ERROR: Access to the path (My_Directory) is denied

我搜索,这似乎是一个权限问题。所以我尝试添加用户ASPNET,并给予适当的权限的目录,但是,我无法添加用户ASPNET。网友ASPNET没有被发现。

I searched and it appears to be a permissions problem. So I attempted to add the user ASPNET and give appropriate permissions to the directory, however, I was unable to add user "ASPNET". User "ASPNET" was not found.

于是我也跟着下面的指令通过控制面板>管理>计算机管理添加用户ASPNET。所以,现在我能够ASPNET用户添加到目录,并给予相应的权限,但我还是得到了上面的错误。

So then I followed the following directions to add user ASPNET via Control Panel > Administration > Computer management. So now I was able to add user ASPNET to the directory and give appropriate permissions but I still got the above error.

http://p2p.wrox.com/网网络服务/ 5918创造-ASPNET,user.html

为什么我不能访问该目录中的任何想法?

Any ideas on why I cant access the directory?

推荐答案

如果你正在使用Vista / Windows 7中/ Win2003的/的Win2008,你需要的用户是网络服务帐户。你可以看到你的应用程序池下运行的用户进行验证。

If you're using Vista/Windows 7/Win2003/Win2008, the user you need is the Network Service account. You can verify by seeing what user your application pool is running under.

授予适当的权限到该帐户(如果确实是你的应用程序池下运行的帐户),你会生金。还要注意的是与Windows 7和的Win2008的默认帐户可能是ApplicationPoolIdentity,您可以了解在的 http://forums.iis.net/t/1156692.aspx 。无论如何,你可以简单地切换您的应用程序池下的网络服务运行的帐户帐户验证这是问题。

Grant the proper permissions to that account (if indeed it's the account that your application pool is running under) and you'll be golden. Note also that with Windows 7 and Win2008, the default account could be the ApplicationPoolIdentity, which you can find out more information about at http://forums.iis.net/t/1156692.aspx. Regardless, you can simply switch the account that your application pool is running under to the Network Service account to verify that that is the issue.

这篇关于asp.net FileUpload控件问题:访问目录被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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