当前身份(NT 机构/网络服务)没有写入权限

发布于 2024-10-12 01:55:44 字数 489 浏览 7 评论 0原文

我开发了一个简单的网络应用程序。一个标签和一个按钮。单击按钮后,标签将显示 Hello World。

当我在 Web 服务器上部署此 Web 应用程序并访问 URL 时,收到此错误消息。

当前身份(NT 权威/网络服务)不 有写权限 C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET 文件\

我尝试了以下操作 -

导航到 C:\Windows\Microsoft.NET\Framework\v2.0.50727 并输入以下命令 -

aspnet_regiis -ga "NT Authority\Network Service"

之后,它也不起作用。

我们检查了临时 ASP.NET 文件文件夹的权限,对于网络服务用户,我们检查了安全权限,它具有所需的所有权限。

I developed a simple web application. A label and a button. On click of Button, the label will display Hello World.

When I deploy this web application on my web server and access the URL, I get this error message.

The current identity (NT
Authority/Network Service) does not
have write access to
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET Files\

I have tried the following -

Navigate to C:\Windows\Microsoft.NET\Framework\v2.0.50727 and typed the following command -

aspnet_regiis -ga "NT Authority\Network Service"

After that also, it did not work.

We checked the permissions of the folder Temporary ASP.NET Files and for the Network Service user, we checked the Security Permissions and it has all the permissions as required.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

枫以 2024-10-19 01:55:44

这对我有用,没有尝试 -ga:

导航到

C:\Windows\Microsoft.NET\Framework\v2.0.50727 

并键入以下命令

aspnet_regiis -i

This worked for me, didn't try the -ga:

Navigate to

C:\Windows\Microsoft.NET\Framework\v2.0.50727 

and type the following command

aspnet_regiis -i
贩梦商人 2024-10-19 01:55:44

我在更换家里的域服务器时遇到了这个错误,该服务器托管着许多网站,主要是温度等数据收集服务。它还运行我用来生成图表的 SSRS。
我构建了新硬件并降级了旧盒子。它不再是DC,而是域的常规成员。当我将网站移至新服务器并尝试访问它时,出现此错误。

运行 aspnet_regiis 没有改变任何东西。现在事实证明,该站点调用的 Reporting Services Web 服务仍然指向旧服务器,并且错误消息实际上来自降级的前域控制器。我必须在旧服务器上运行 aspnet_regiis -i !

要点:

  1. 降级 PDC 可能会导致权限混乱,
    导致此错误
  2. 该错误可能不是来自您本地
    机器 - 超越显而易见的事物!

I ran into this error while replacing my domain server at home that hosts a bunch of websites, mostly data collection services for temperature etc. It also runs SSRS that I use to produce charts.
I built new hardware and demoted the old box. It is no longer a DC, but a regular member of the domain. When I moved a website to the new server and tried to hit it, I got this error.

Running aspnet_regiis did not change anything. Now it turns out that the site calls the Reporting Services web service that still pointed to the old server, and that the error message is actually coming from the demoted former domain controller. I had to run aspnet_regiis -i on the old server!

Takeaways:

  1. Demoting a PDC can cause the permissions to get messed up,
    resulting in this error
  2. The error may not come from your local
    machine - look beyond the obvious!
唐婉 2024-10-19 01:55:44

Eugene,您可以像 LocalSystem 一样以足够高的权限让它工作,但请记住 LocalSystem 在本地服务器上具有管理员权限,并且还可以访问计算机帐户下的网络资源,因此如果您的应用程序被利用,攻击者就可以获得访问权限到很多资源。另一方面,网络服务只是本地服务器上的用户帐户,并且还在计算机帐户上下文中访问网络资源。

Eugene, You can get it working with high enough privilege like LocalSystem, but keep in mind that LocalSystem has administrator privileges on the local server and can also access network resources under the computer account, so if you application gets exploited, the attacker can get access to a lot of resources. Network Service on the other hand is just a user account on the local server and is also accessing network resources in the computer account context.

停顿的约定 2024-10-19 01:55:44

当您使用“文件夹属性”->“安全”选项授予对临时 ASP.NET 文件夹的权限时,我要检查的一件事是您是否授予正确的网络服务帐户的设置权限。如果对话框找到的网络服务用户位于不同位置而不是本地实例,则可能会发生这种情况。

One thing I would check when you are give permission to the Temporary ASP.NET folder using Folder Properties->Security option is if your are giving setting permission for right Network Service account. This can happen if the Network Service user the dialog is finding is for different location and not the local instance.

肩上的翅膀 2024-10-19 01:55:44

我将应用程序池的标识更改为使用本地系统帐户而不是网络服务。回收应用程序池,一切正常。这为我解决了这个问题。我认为我的服务器上的“网络服务”存在潜在问题,因为我在使用此帐户的 SQL 时遇到问题。同样,在安装过程中也使用了 LocalSystem 来通过该操作。

I changed the Identity of the application pools to use LocalSystem account as opposed to Network Service. Recycled the Application pools and everything was ok. This resolved it for me. I think there is an underlying issue with the "Network Service" on my server as I had problems with SQL using this account. Again just used LocalSystem during the install to get passed that also.

情话墙 2024-10-19 01:55:44

我必须将应用程序池标识设置为 NETWORKSERVICE
然后将连接到我的网站的用户(您在网站基本设置下的 IIS 设置中“连接为”的用户)添加到 IIS_IUSRS 组

I had to set the Application Pool identity to NETWORKSERVICE
And then add the user connecting to my website (the user you 'connect as' in IIS settings under Basic Settings for your website) to the IIS_IUSRS group

阳光的暖冬 2024-10-19 01:55:44

我遇到了“C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files”目录丢失的情况(以及 Framework64 版本:C:\Windows\Microsoft.NET\Framework64 \v4.0.30319\临时 ASP.NET 文件)。我在每个父目录中创建了丢失的“临时 ASP.NET 文件”目录,并且 Web 应用程序开始工作。因此,如果您每次删除“临时 ASP.NET 文件”目录本身,请重新创建它,这样就不会遇到此问题。

I ran into a case where the 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files' directory was missing (as well as the Framework64 version: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files). I created the missing "Temporary ASP.NET Files" directory in each parent directory and the web app started working. So if you every delete the "Temporary ASP.NET Files" directory itself, recreate it so you do not run into this issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文