I am using enterprise library version 4.0 in my application. I have set the "Treat warning as error" to All in VS2010.
While trying to build the .net 2.0 application in .Net 4.0(Visual Studio) I am getting the following warning: 'System.Security.Permissions.SecurityAction.RequestMinimum' is obsolete: '"Assembly level declarative security is obsolete and is no longer enforced
by the CLR by default".
The warning occurs in the following projects:
Caching, Common, ExceptionHandling, ExceptionHandling.Logging, Logging, Microsoft.ApplicationBlocks.Data, ObjectBuilder, Cryptography
The warning occured for the following attributes in AssemblyInfo.cs
MessageQueuePermission(SecurityAction.RequestMinimum, Unrestricted = true)]
ReflectionPermission(SecurityAction.RequestMinimum, Flags = ReflectionPermissionFlag.MemberAccess)]
ReflectionPermission(SecurityAction.RequestMinimum, MemberAccess = true)]
SecurityPermission(SecurityAction.RequestMinimum, SerializationFormatter = true)]
SqlClientPermission( SecurityAction.RequestMinimum )]
Please let us know -
1. What should be the equivalent in 4.0?
2. What standard should be followed in .net 4.0 ?
2. What will be the impact if that "SecurityAction.RequestMinimum" attribute is removed for application running under admin and non-admin user ids in Windows XP or Windows Vista or Windows 7