浏览网站时出现服务器错误 [英] Server Error while browsing website

查看:74
本文介绍了浏览网站时出现服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

浏览Web应用程序时,出现以下错误.

该进程不具有此操作所需的"SeSecurityPrivilege"特权.

说明:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息.

异常详细信息:System.Security.AccessControl.PrivilegeNotHeldException:该进程不具有此操作所需的"SeSecurityPrivilege"特权.

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

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

源错误:


第28行:{
第29行:DirectoryInfo ds = new DirectoryInfo(sf);
第30行:ds.GetAccessControl(System.Security.AccessControl.AccessControlSections.All);
第31行:ds.Refresh();
第32行:if(DateTime.Now.Subtract(ds.LastAccessTime)> TimeSpan.FromMinutes(1))

源文件:d:\ Reconciliation \ Recon \ Site.master.cs行:30

When I am browsing web application I have been getting following error.

The process does not possess the ''SeSecurityPrivilege'' privilege which is required for this operation.

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.Security.AccessControl.PrivilegeNotHeldException: The process does not possess the ''SeSecurityPrivilege'' privilege which is required for this operation.

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 and IIS 7, and the configured application pool identity on IIS 7.5) 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:


Line 28: {
Line 29: DirectoryInfo ds = new DirectoryInfo(sf);
Line 30: ds.GetAccessControl(System.Security.AccessControl.AccessControlSections.All);
Line 31: ds.Refresh();
Line 32: if (DateTime.Now.Subtract(ds.LastAccessTime) > TimeSpan.FromMinutes(1))

Source File: d:\Reconciliation\Recon\Site.master.cs Line: 30

推荐答案



这与您的IIS权限问题有关

右键单击IIS中已部署的网站,然后转到权限"部分并提供必要的权限

这样可以解决您的问题

希望这可以帮助
Hi,

This is related to your IIS permission issue

Right click on your deployed website in IIS and go to permission section and give the necessary permissions

This will solve your problem

Hope tis helps


这篇关于浏览网站时出现服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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