Lincenses and LinqBridge.dll

Automate and integrate using the SQL comparison API

Moderators: Chris Auckland, David Atkinson, Michelle Taylor, chengvoon.tong

Lincenses and LinqBridge.dll

Postby huynh07 » Thu Jun 19, 2014 6:07 am

I'm automating sql data and schema compare for one of my company's project. I have two issues that I'm trying to fix.

1. The data and schema is working for me locally, but I'm getting this issue when I'm running it on the site. I did a little digging around and it sounds like it's related to lincesing.

"howing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application."

Here is the stack trace.

at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at RedGate.SQLToolkit.Engine.Licensing.frmRegistration.GetDesignTimeLicence(Type type, Object instance, Boolean allowExceptions)
at RedGate.SQLToolkit.Engine.Licensing.ToolkitLicenceProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
at RedGate.SQLCompare.Engine.Database..ctor()

How am I supposed to set up the toolbelt license? Sorry, I'm very new to using third party dll and licensing.

I'm using these DLLs:
RedGate.Shared.SQL.dll
RedGate.Shared.Utils.dll
RedGate.SOCCompareInterface.dll
RedGate.SQLCompare.ASTParser.dll
RedGate.SQLCompare.Engine.dll
RedGate.SQLCompare.Rewriter.dll
RedGate.SQLDataCompare.Engine.dll

2. My second issue is LinqBridge.dll. I know it's a dependency of RedGate and it can screw up MVC Razor and if you reference it inside your solution then it will make System.Linq confuse. Is there any way around this?

Thanks in advance!
huynh07
 
Posts: 4
Joined: Thu Jun 19, 2014 5:57 am

Postby huynh07 » Fri Jun 20, 2014 5:46 am

Does anyone have any suggestions on things to try?
huynh07
 
Posts: 4
Joined: Thu Jun 19, 2014 5:57 am

Postby Brian Donahue » Fri Jun 20, 2014 2:56 pm

I'm told that if you use the option Options.DisableSocForLiveDbs, SDK 10 will stop trying to load "linqbridge".

Licensing is pretty-well documented on the website. However trying to licence the components in a website is an ordeal because ASP .NET uses dynamic compilation and the licensing scheme works by embedding a resource into the assembly at compile-time.

Red Gate put up an article about creating a resource dll that you can build for ASP .NET in order to persist the activation, but it's not easy to understand.
http://documentation.red-gate.com/displ ... plications

I always recommend putting all of the SDK logic into its' own class library and sticking that in the website BIN folder so you can do the licensing in the officially-supported way and let the Microsoft Licence compiler create the resource automatically when it detects the licenses.licx file.

NB that you can't apply an evaluation licence to a web app because you always have to click OK on a nag requester of any app built with an evaluation version of the SDK.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby Brian Donahue » Fri Jun 20, 2014 4:48 pm

Just to add, I think you *may* be able to evaluate SDK in a web app if you use IIS Express or some webserver that runs on a user desktop session.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Comparison SDK 10

Who is online

Users browsing this forum: No registered users and 0 guests