如何在IIS中设置正确的文件权限ASP.NET [英] How to set correct file permissions for ASP.NET on IIS

查看:630
本文介绍了如何在IIS中设置正确的文件权限ASP.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HTTP错误500.19 - 内部服务器错误   所请求的页面无法访问,因为该页的相关配置数据无效。

HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.

错误code :0X80070005
  配置错误:无法读取由于没有足够的配置文件   权限

Error Code : 0x80070005
Config Error : Cannot read configuration file due to insufficient permissions

在IIS 7.5中添加新的Web应用程序并运行它,证明我这个页面,如何解决这个问题,Win7旗舰版的Visual Studio 2010

When add new web application in IIS 7.5 and run it, this page shown to me, how to solve this problem win7 ultimate visual studio 2010

推荐答案

信息是明确的。

无法读取配置文件,因为没有足够的权限

Cannot read configuration file due to insufficient permissions

每一个asp.net应用程序是根据分配给它 一池运行,并且每个池在特定帐户下运行

How to solve it.

Every asp.net application is run under one pool assigned to it, and each pool is run under a specific account.

打开IIS,找到下您的应用程序是尝试运行,看到分配给该池的用户池,并给予读取权限给该用户在你的整个网站的目录树。

Open the IIS, locate the pool under which your app is try to run, see the user that is assigned to that pool, and give read permissions to that user on your full site directory tree.

web.config中,它的配置文件的消息称,必须有(和)写权限

The web.config, its the configuration file that message says, must have (and) write permissions.

所以,你找到的web.config在您的网站的根目录,右击它,进入权限,并就在泳池用户,写能力。该池的用户,是池运行魔女下的用户,我解释如下。

So you locate web.config on the root of your site, right click on it, go to permissions and give on the pool-user, the write capability. The pool user, is the user under the witch the pool is run, as I explain below.

要能够运行公共asp.net网站与IIS,在目录中的每个文件必须具有权限的两个帐户。

To been able to run a public asp.net site with IIS, each file on the directory must have permissions for two accounts.

这是允许公众访问一个账户,并分配给应用程序池的帐户有。

One account that is permitted for public access, and the account that assigned to that application pool have.

要查找/ assing你去你的IIS站点的第一个帐户|认证|编辑,查看,或当你在该截图中看到改变它。

To find/assing the first account you go to your iis site | Authentication | Edit, and see or change it as you see on that screen shot.

现在注意,名称,我们会发现,用户在与池运行。
去你的IIS网站,并点击基本设置,找到池名称,然后去到IIS |应用程序池,看到标识列,并记下用户的名称您的网站运行巫婆下。

Now note that name and we going to find the user under with the pool run.
Go the your IIS Site and click on the Basic Settings to find the pool name, then go to the IIS | Application Pools and see the Identity column, and note the name of the user under the witch your site is run.

现在,我们有两个用户名,我们去的网站的根目录,并设置权限的最小的是读为

Now that we have the two users names we go to the root of the site and set the minimum of permissions that is the read as

  • 如果该IIS_Public_ACCESS_USER不给读取权限的网站上运行,但索要密码
  • 在您需要和写入权限,如果你让,例如你的用户上传图片,或继续的App_Data,一些数据库文件的一些目录。只有对目录你给的写权限IIS_POOL_USER。
  • 在某些目录,如App_Data文件和APP_ code具有asp.net直接保护,他们不会允许来自客户端的任何人都可以运行或查看什么是在那里。
  • 在公共目录,允许写访问到你的用户添加asp.net文件之一的web.config和完全关闭所有正在运行的。

更多读了,让写权限<一个目录href="http://stackoverflow.com/questions/4288362/ive-been-hacked-evil-aspx-file-uploaded-called-aspxspy-theyre-still-trying">I've被黑客入侵。邪恶的aspx文件上传名为AspxSpy。他们仍然在努力。帮我捕捉它们!

这篇关于如何在IIS中设置正确的文件权限ASP.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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