无法访问IIS 7 MVC应用中的文件-Server 2008 R2 [英] No access to files in iis7 mvc app - server 2008 r2

查看:69
本文介绍了无法访问IIS 7 MVC应用中的文件-Server 2008 R2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了Windows Server 2008 R2以及Visual Studio和保管箱.我将其用作开发虚拟机,而保管箱可帮助我使文件与其他计算机保持同步.

I've just installed windows server 2008 r2 along with visual studio and dropbox. I'm using it as a VM for development and dropbox helps me keep my files in sync with other machines.

我已经在IIS中设置了我的网站,但是在尝试查看该网站时出现访问被拒绝的错误.我以前曾遇到过这个问题,过去已经解决过这个问题,并将IIS_User帐户添加到读取/修改文件的权限列表中.我认为因为文件已被下拉框复制下来,所以文件没有必要的权限.这是一个问题,我无法通过修改文件夹的权限来批量更新文件,我必须一次执行一次,直到文件级别,更糟糕的是一次!我不能拥有这个.

I've got my site set up in IIS but I'm getting an access denied error when trying to view the site. I've had this before and to get around it in the past I've gone through and added the IIS_User account to the list of permissions to read/modify the files. I assume because the file's have been copied down with drop box the files don't have the necessary permissions. Here's the bugger, I can't batch update the files by modifying permissions on a folder, I'm having to do it right to the file level and even worse, one at a time! I can't have this.

我对2008 r2和IIS 7相对较新,所以我不知道这里发生了什么.有人可以解释发生了什么,是否有IIS/文件许可权设置,我可以更新以在顶层文件夹中解决它?

I'm relatively new to 2008 r2 and IIS 7 so I have no idea what's happening here. Can someone explain what is going on and if there's an IIS/file permission setting I can update to resolve it at the top level folder?

我尝试在IIS中的网站上添加匿名权限,并且在IIS_User(甚至每个人)的文件夹中添加了权限.我有一个管理员帐户,并且已经设置该帐户允许我读取/写入/修改文件.

I've tried adding anonymous permssions on the website in IIS and I've added permissions on the folder for IIS_User (even Everyone). I have an Administrator account and that's already set to allow me to read/write/modify the files.

这通常是我收到的消息加载配置文件时发生错误:拒绝访问路径X".

This is typically the message I'm getting 'An error occurred loading a configuration file: Access to the path X is denied'.

这是在ascx& aspx文件以及配置文件.

This is happening on ascx & aspx files as well as config files.

从Visual Studio调试时,该站点是可见的. 该网站正在完全信任"(内部)运营

Edits: The site is visible when debugging from Visual Studio. The site is operating in Full Trust (internal)

请帮助,这阻止了我的工作并使我发疯!

Please help, this is stopping me from working and driving me insane!

推荐答案

默认情况下,在IIS 7中,网站以本地系统的网络帐户(NetworkService)而不是IIS_User的身份运行.

By default in IIS 7, websites run as the local system's network account (NetworkService), not as IIS_User.

要进行验证,请在IIS管理器中选择有问题的站点,单击基本设置...",然后检查分配给它的应用程序池.然后进入应用程序池并检查该应用程序池的身份.确保列出的用户在ACL中.

To verify, in IIS Manager, select the Site in question, click Basic Settings... and check the Application Pool it is assigned to. Then go into Application Pools and check the Identity for that Application Pool. Make sure that user listed is in the ACL.

将所有人添加到ACL应该可以,但是以防万一我建议您检查上面的内容.当然,还请确保在设置ACL时,选中用于重置所有子文件夹上的继承的框(如果适用于您的应用程序).

Adding Everyone to the ACL should work instead, but just in case I would suggest you check the above. Also of course make sure when you set the ACL to check the box for resetting inheritance on all subfolders, if that is appropriate for your application.

您还可以尝试将应用程序池的标识设置为已创建的本地(或域)用户,该用户可以访问您的应用程序目录.

You could also try setting the identity of the application pool to a local (or domain) user you have created which has access to your application directory.

希望有帮助.

这篇关于无法访问IIS 7 MVC应用中的文件-Server 2008 R2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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