License error

I’ve successfully built and deployed GoDiagram based applications in the past. We’ve always used an embedded license key (generated by your license manager tool) rather than a .licx file which is compiled into an EXE. However, whenever I attempt this with FIPS cryptography enabled I get a GoView License Check dialog.



Steps to reproduce are pretty straight forward using VS2008SP1:

1. Copy the Demo1 sample folder to another location. Delete the licenses.licx file.

2. Edit demo13.csproj to remove the licenses.licx embedded resource.

3. Double click demo13.csproj to open in Visual Studio.

4. Change the project properties to target .NET 3.5.

5. Use the LicenseManager application to generate an embedded license key.

6. Paste the embedded key into the top of the MainForm constructor.

7. Compile in release mode. You should now have Demo1.exe plus the 3 go/svg/xml assemblies in your bin\release folder.

8. Copy the assemblies to a system that lacks a node locked Northwoods license.

9. On the new system, execute demo1.exe and verify it starts. Close the app.

10. Go to Admin Tools -> Local Security Policy and edit Local Policies -> Security Options. Set “System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing” to enabled.

11. Try to start demo1.exe again. You now get a GoView License Dialog that states the license is invalid or has expired.



This is all done using GoDiagram 3.0.2 for .NET 3.5 on WinXP SP2.

We had a problem with FIPS encryption in 2.6, but we fixed it in 3.0. Are you sure you’re running 3.0 libraries?

Positive. I’m using the 3.0.2.2 version of the assemblies. I previously misspoke about the XP service pack: it’s actually SP3, not SP2. Here’s the call stack I’m seeing:



mscrolib.dll!System.Security.Cryptography.Utils.FipsAlgorithmPolicy.get()

mscorlib.dll!System.Security.Cryptography.RijndaelManaged()

Northwoods.Go.dll!Northwoods.GoGoViewLicenseProvider.Dispose(string ks, int run)

Northwoods.Go.dll!Northwoods.GoGoViewLicenseProvider.GetLicense(System.ComponentModel.LicenseContext context, System.Type type = {Name = “GoView” FullName = “Northwoods.Go.GoView”}, object instance = {Northwoods.Go.GoOverview}, bool allowExceptions = true)

System.dll!System.ComponentModel.LicenseManager.ValidateInternalRecursive(System.ComponentModel.LicenseContext context = {System.ComponentModel.Design.RuntimeLicenseContext}, SYstem.Type type = {Name = “GoView” FullName = “Northwoods.Go.GoView”}, object instance = {Northwoods.GoGoOverview}, bool allowExceptions = true, out SYstem.ComponentModel.License license = null, out string licenseKey = null)

System.dll!System.ComponentModel.LicenseManager.ValidateInternal(System.Type type, object instance, bool allowExceptions, out System.ComponentModel.License license)

System.dll!System.ComponentModel.LicenseManager.Validate(System.Type type = {Name = “GoView” FullName = “Northwoods.Go.GoView”}, object instance = {Northwoods.Go.GoOverview})

Northwoods.Go.dll!Northwoods.Go.GoView.init(Northwoods.Go.GoDocument doc = null)

Northwoods.Go.dll!Northwoods.Go.GoView()

Northwoods.Go.dll!Northwoods.GoOverview()

More info: compiling the Demo1 application the way it’s shipped (with the licx file) gives the same result (including same stack trace).



I also failed to give you the exception detail. It is:



----

System.InvalidCastException occured.

Message=“Specified cast is not valid.”

Source=“mscorlib”

StackTrace

at SYstem.Security.Cryptography.Utils.get_FipsAlgorithmPolicy()

InnerException:

-----

I’ve sent some instructions via email.

Jake, thanks for the instructions. We dug deeper into this problem and it winds up being a problem with the security patches on the system. I’m not sure exactly what was done, but the system had been patched in such a way that the .NET managed crypto classes were broken. (I couldn’t even instantiate an instance of the RijndaelManaged class after FIPS cryptography had been enabled.) So it looks like an environment problem, not a Northwoods problem. I appreciate your looking into it.