What are the challenges you face when working across database platforms? Take the survey
Options

SQL CLR Assembly with Strings Encodesd

icelorrioicelorrio Posts: 2
edited February 21, 2012 12:21PM in SmartAssembly
I am trying to store on our SQL Server 2005 an assembly obfuscated with SmartAssembly 6.

When I try to encrypt the strings, it makes an assembly that is not valid for store into SQL Server 2005.
I tried with different configurations, and it also fails the simplest (no obfuscation, string encoding, no string encoding improvement, no string encrypt, no strnig cache)

That is a problem because we want to encrypt all the strings into the assembly.

This is the message:
Msg 6211, Level 16, State 1, Line 3
CREATE ASSEMBLY failed because type 'SmartAssembly.StringsEncoding.Strings' in safe assembly '<OUR_ASSEMBLY_NAME>' has a static field 'MustUseCache'. Attributes of static fields in external_access assemblies must be marked readonly in Visual C#, ReadOnly in Visual Basic, or initonly in Visual C++ and intermediate language.

Thanks

Comments

  • Options
    Thanks - I believe you have already opened a support ticket about this with Red Gate and we will be in touch via email.

    Preliminarily, it looks to me like the strings encoding feature wasn't compatible with CLR assemblies in v5 of SmartAssembly, was fixed in v6, and apparently broken again in 6.5.
Sign In or Register to comment.