Crash after obfuscation : Security Rules Violated.
UsherNet
Posts: 7
I experience an issue after running SA6, the exe works before the obfuscation. Anyone any ideas?
Inheritance security rules violated while overriding member: 'SmartAssembly.SmartExceptionsCore.SmartStackFrame.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.
TIA
Paul
Inheritance security rules violated while overriding member: 'SmartAssembly.SmartExceptionsCore.SmartStackFrame.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.
TIA
Paul
Comments
I can't be 100% sure, but it sounds again like that problem you have when you used .NET 2 code access policy and tried to run it in .NET 4. There probably needs to be a SecurityTransparent attribute removed from some method. Have you got a stack trace leading up to this error?
Decoded stack trace is:
at SmartAssembly.SmartExceptionsCore.StackFrameHelper.CreateExceptionN(Exception , Object[] )
at SmartAssembly.SmartExceptionsCore.StackFrameHelper.CreateException4(Exception , Object , Object , Object , Object )
at SmartAssembly.StringsEncoding.Strings..cctor()
Occurs with or without string encoding enabled.
Fake Edit:
Adding the following attribute to the Assembly resolved the issue:
<Assembly: System.Security.SecurityRules(System.Security.SecurityRuleSet.Level1)>