IIS7.5上的System.UnauthorizedAccessException,处处完全控制 [英] System.UnauthorizedAccessException on IIS7.5, full control everywhere

查看:200
本文介绍了IIS7.5上的System.UnauthorizedAccessException,处处完全控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使IIS7.5上运行ASP.NET Web API应用程序.我已经为默认网站添加了一个应用程序.它运行在DefaultAppPool中,并启用了匿名身份验证和禁用了ASP.NET模拟. Web API可以正常运行:我可以运行它并返回结果.

I'm trying to get an ASP.NET Web API application running on IIS7.5. I've added an application tot the default web site for it. It's running in the DefaultAppPool, with anonymous authentication enabled and ASP.NET impersonation disabled. The Web API works fine: I can run it and it returns results.

但是,当我调用应该返回图像的操作时,会收到System.UnauthorizedAccessException.我认为这只是一个授权问题,所以我转到了文件的安全对话框,并完全控制了IIS AppPool \ DefaultAppPool用户.这没有用.然后,我尝试赋予所有人对文件的完全控制权,但仍然出现异常.

However, when I call an operation that is supposed to return an image, I get a System.UnauthorizedAccessException. I figured it's just an authorization issue, so I went to the file's security dialog and gave the IIS AppPool\DefaultAppPool user full control. This did not work. I then tried to give Everyone full control on the file, but I still got the exception.

我很茫然.这可能是怎么回事?

I'm at a loss. What could be going on here?

推荐答案

我已经找到了解决方案...但是我不确定为什么.而不是转到文件夹属性>安全性>编辑...>添加...>并添加IIS AppPool \ DefaultAppPool,我转到该文件夹​​并选择属性>高级...>更改权限...>添加..和在此添加了IIS AppPool \ DefaultAppPool用户.这两种方法有什么区别?

I've since found the solution... but I'm not sure why. Rather than going to the folder properties > Security > Edit... > Add... > and adding IIS AppPool\DefaultAppPool I went to the folder and chose properties > Advanced... > Change Permissions... > Add.. and added the IIS AppPool\DefaultAppPool user there. What's the difference between those two methods?

这篇关于IIS7.5上的System.UnauthorizedAccessException,处处完全控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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