在远程共享主机上获得有关安全权限的以下错误。 [英] getting the following error regarding security permission on remote shared hosting.

查看:61
本文介绍了在远程共享主机上获得有关安全权限的以下错误。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误:

拒绝访问路径'D:\ WEBDATA \2much2win.com \CatchException_20140203'。





描述:执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。



异常详细信息:System.UnauthorizedAccessException:拒绝访问路径'D:\WEBDATA\2much2win.com \CatchException_20140203'。



ASP.NET无权访问所请求的资源。考虑将资源的访问权限授予ASP.NET请求标识。 ASP.NET具有基本进程标识(在IIS 5上通常为{MACHINE} \ ASPNET或在IIS 6上为网络服务),如果应用程序未模拟,则使用该标识。如果应用程序通过< identity impersonate =true>模拟,则标识将是匿名用户(通常为IUSR_MACHINENAME)或经过身份验证的请求用户。



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



来源错误:





第110行:字符串fileName = string.Empty;

第111行:fileName = string.Concat(filePath);

第112行: System.IO.StreamWriter sw = new StreamWriter(fileName,true);

第113行:sw.AutoFlush = true;

第114行:sw.WriteLine(msg);



源文件:d:\ webdata \2much2win.com \ App_Code \ DataClass.cs行:112







请注意此错误我无法登录我的网站并请告诉我我必须遵循的流程才能设置适当的权限,以便任何注册用户都可以登录。

Error:
Access to the path 'D:\WEBDATA\2much2win.com\CatchException_20140203' 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 'D:\WEBDATA\2much2win.com\CatchException_20140203' 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:


Line 110: string fileName = string.Empty;
Line 111: fileName = string.Concat(filePath);
Line 112: System.IO.StreamWriter sw = new StreamWriter(fileName, true);
Line 113: sw.AutoFlush = true;
Line 114: sw.WriteLine(msg);

Source File: d:\webdata\2much2win.com\App_Code\DataClass.cs Line: 112



beacuase of this error i am not able to log in to my website and pls tell me what process do i have to follow in order to set appropriate permission so that any registered user can log in.

推荐答案

参考 [已解决]拒绝访问路径。 [ ^ ]并按照解决方案。



基本上,如果您尝试在没有所需授权的资源上运行,则会出现此异常。
Refer [Solved] Access to the path is denied.[^] and follow the solutions.

Basically, this Exception comes if you are trying to operate on a resource not having required authorization.

这篇关于在远程共享主机上获得有关安全权限的以下错误。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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