Bri*_*ght 8 asp.net security exception
主持人:GoDaddy共享主机
信任等级:中等
提交有效的用户/通行证后会发生以下情况.数据库具有读/写权限,当我删除管理页面上的登录要求时,按预期更新数据库工作.
有没有其他人有这个问题或知道问题是什么?任何人?
Server Error in '/' Application.
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
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.
Stack Trace:
[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +59
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +684
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +114
System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForRead(String streamName) +80
System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName, Boolean assertPermissions) +115
System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String streamName) +7
System.Configuration.Internal.DelegatingConfigHost.OpenStreamForRead(String streamName) +10
System.Configuration.UpdateConfigHost.OpenStreamForRead(String streamName) +42
System.Configuration.BaseConfigurationRecord.InitConfigFromFile() +437
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Run Code Online (Sandbox Code Playgroud)
小智 10
http://www.codeproject.com/Questions/586223/SecurityplusExceptionpluscomingplusinplusaplusrunn
解决方案4 System.Security.SecurityException:请求类型'System.Net.SocketPermission,System,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'的权限失败
以下解决上述错误
<system.web>
<customErrors mode="Off"/>
<trust level="Full" />
</system.web>
Run Code Online (Sandbox Code Playgroud)
适用于我的教父托管
如果您正在使用任何第三方组件,您可能需要检查这些组件是否正在执行某种类型的安全操作。大约一年前,我遇到了 GoDaddy 和 SubSonic ORM 的问题,它在请求一定程度的安全性的特定代码行上存在问题。我在reflector中破解了代码,看了一下,验证了它。
这可能是一个问题。如果该组件给您带来痛苦,请尝试下载代码并删除可疑代码,然后重新编译并运行。这正是我一两年前必须使用 SubSonic 代码所做的事情。