SA 6.7 with simple Wcf Service
Chris Gorringe
Posts: 20 Bronze 2
I have a fairly simple Wcf service that performs some logic and interacts with a SQL database etc. This Wcf service is called by a number of SQL CLR triggers. If I obfuscate everything other than the Wcf service, it all works fine (I was surprised that the SQL CLR Triggers worked without extra fiddling). As soon as I obfuscate the Wcf service, the Wcf service starts to throw exceptions regarding security access to the Windows Event log. Although my service is capable of writing to the the Windows Event log, the functionality is switched off. If I turn of SA within MSBuild for the Wcf Service, it works correctly and does not attempt to write to the event log.
I have checked that all the service contract interfaces and classes are not obfuscated but it would appear that that is what SA does anyway.
I am only doing obfuscation with none of the other fancy SA tricks.
Any ideas why it might be going wrong?
I have checked that all the service contract interfaces and classes are not obfuscated but it would appear that that is what SA does anyway.
I am only doing obfuscation with none of the other fancy SA tricks.
Any ideas why it might be going wrong?
Comments
So my problem was Linq-to-SQL which I have now solved by excluding the data objects from obfuscation but because these objects are created by a designer rather than code, how can I decorate the classes with the DoNotObfuscate attribute and is it possible to change the Linq-to-SQL templates so that they are always decorated?
I think you'll need to do this from the GUI. When you select an assembly to be obfuscated (or pruned) you get the option to Exclude any namespace, class, method or field.
Can you please try this and see how it goes?[/quote]
What I want to do is to decorate the classes in code so that I do not have to go into the SA GUI to exclude the classes. As the code is generated by a designer in VS2010, I wanted to know how to decorate them without losing the information if the designer rebuilds the classes.
Ideally, I want to amend the VS2010 templates so that all Linq-to-SQL code generated by VS is automatically decorated with the necessary information to prevent it from being obfuscated