iis 7中拒绝访问 [英] Access Denied in iis 7

查看:71
本文介绍了iis 7中拒绝访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在VS2005中用C#开发了一个应用程序asp.net.
在该应用程序中,我使用PDF显示报告.

当我在本地运行时,它的工作PDF正常运行,但是当我在iis7中部署时,我收到了错误呼叫访问被拒绝的信息. 这是错误.............
................................................... ....

Access to the path c:\SADEmpty.pdf is denied.
说明:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪,以获取有关错误及其在代码中起源的详细信息.

异常详细信息:System.UnauthorizedAccessException:拒绝访问路径"c:\ SADEmpty.pdf".

没有授权ASP.NET访问请求的资源.考虑将资源的访问权限授予ASP.NET请求标识. ASP.NET具有一个基本进程标识(在IIS 5上通常为{MACHINE} \ ASPNET或在IIS 6上通常为Network Service),如果应用程序无法模拟,则可以使用该标识.如果应用程序正在通过< identity impersonate ="true"/>进行模拟,则该身份将是匿名用户(通常为IUSR_MACHINENAME)或经过身份验证的请求用户.

要授予ASP.NET对文件的访问权限,请在资源管理器中右键单击该文件,选择属性",然后选择安全性"选项卡.单击添加"以添加适当的用户或组.突出显示ASP.NET帐户,然后选中所需访问权限的框.

源错误:

当前Web请求的执行期间生成了未处理的异常.可以使用下面的异常堆栈跟踪来标识有关异常的来源和位置的信息.

Hi ALL,

i developed one application asp.net with c# in VS2005.
in that Application i m using PDF to show reports.

when i run locally its working PDF working fine but when i deployed in iis7 then i m getting error call acess denied.
THIS IS ERROR.............
......................................................

Access to the path c:\SADEmpty.pdf is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path ''c:\SADEmpty.pdf'' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

推荐答案

在应用程序的web.config文件中提供模拟的详细信息. br/> 如波纹管.
例如:
< identity impersonate =" true& quot; userid ="domainName \ username" password ="password"/> ;;.

然后向指定的标识用户提供权限,将其添加到特定文件夹U中.
在这里,文件应放置在您需要授予权限的任何特定文件夹中.
In web.config file of your application provide the impersonate details.
as bellow.
Ex:
<identity impersonate=&quot;true&quot; userid="domainName\username" password="password"/>;.

Then provide permission to the specified identity user to the specific folder U added the file.
Here files should be places in any specific folder to which u need to provied permission.


您好,

问题是,asp.net没有对该文件的权限,该文件直接位于c:\.
添加对NETWORK SERVICE,IIS_IUSRS的权限

问候
Robert
Hi,

problem is, that asp.net doesn''t have permission to the file, which is located directly on c:\.
add rights to NETWORK SERVICE, IIS_IUSRS

Regards
Robert


为试图在其中写入PDF文件的位置的文件夹提供适当或完整的权限.

请验证文件夹的以下权限,例如:
ASPNET
IWAMUSER
网络


如有任何疑问,请让我知道.

请提供"投票":thumbsup:如果有帮助,请提供"接受答案",如果这是正确的答案.:rose:

谢谢,
Imdadhusen
Provide appropriate or full rights to the folder wherever you are trying to write a PDF file.

Please verify following rights on folder like:
ASPNET
IWAMUSER
NETWORK


Please do let me know, if you have any doubt.

Please provide "Vote":thumbsup: if this would be helpful, and make "Accept Answer" if this would be correct answer.:rose:

Thanks,
Imdadhusen


这篇关于iis 7中拒绝访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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