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

Lincenses and LinqBridge.dll

huynh07huynh07 Posts: 6
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:

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!


  • Options
    Does anyone have any suggestions on things to try?
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    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.
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    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.
Sign In or Register to comment.