공유 서버를 호스트하는 .Net 4 사이트가 있습니다. 그것 때문에의 Web.config의 신뢰 수준 설정의 아마 저에게 힌트를 제공FileIOPermission 호스트에서 신뢰 수준이 비활성화 된 공유 서버의 예외입니다.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
: 내가하는 나는 다음과 같은 오류가 발생합니다, 로그인을 시도하여 멤버 자격 공급자에 액세스 할 때까지 잘 작동
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.
불행히도 호스트가이를 사용 중지했기 때문에 신뢰 수준을 변경할 수 없습니다. 하지만 필자는 파일 시스템에 쓸 필요가 없기 때문에 FileIOPermission 액세스가 필요하다는 것을 확신하지 못합니다.
내 멤버십 공급자는 기본 MembershipProvider를 재정의하여 비정상적인 것으로 인식하지 못하는 파일을 작성합니다. 변경된 사항은 사용자 테이블에 일부 매개 변수를 추가하는 것입니다.
FileIOPermission에 대한 필요성을 없애는 방법이 있습니까?
스택 추적 :
[SecurityException: Request for the permission of type
'System.Security.Permissions.FileIOPermission, mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
cap, StackCrawlMark& stackMark) +31
System.Security.CodeAccessPermission.Demand() +46
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, Boolean useLongPath) +597
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +83
System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForRead(String
streamName) +79
System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String
streamName, Boolean assertPermissions) +124
System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForRead(String
streamName) +10
System.Configuration.Internal.DelegatingConfigHost.OpenStreamForRead(String
streamName) +13
System.Configuration.UpdateConfigHost.OpenStreamForRead(String
streamName) +38
System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
+450
어떤 멤버십 공급자를 사용하고 있습니까? –
기본 MembershipProvider의 재정의 NCCMembershipProvider가 있습니다 – RyanJMcGowan