zzzprojects/Eval-SQL.NET

SQL Server 2019 Express - don't can load the assembly

chri-p opened this issue · 7 comments

When I call the statement ...where SQLNET::New('Regex.IsMatch(TTel, @"([^0-9\-\+ ()\.\/\[\]\|])")').ValueString('TTel', isnull(M.TTel, '')).EvalBit() = 1 I get the mistake

Msg 10314, Level 16, State 14, Line 6
An error occurred in the Microsoft .NET Framework while trying to load assembly id 65543. The server may be running out of resources, or the assembly may not be trusted. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error:
System.IO.FileLoadException: Could not load file or assembly 'z.expressions.sqlserver.eval, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A)
System.IO.FileLoadException:
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)

I made the installation to the first on an SQL Server 2019 Express. I don't get this mistake by SQL Server 2019 Standard.

How can I correct the mistake?

Best regards

Hello @chri-p ,

Thank you for reporting, we will look at it.

Hello @chri-p ,

Unfortunately, everything works for SQL Express 2019 on our side.

We currently have no idea how to reproduce it. If you have more info, we will be happy to look at it.

Is there something special about your environment?

Best Regards,

Jon

Sure, let us know.

As far as we know, it works in all versions.

However, most cloud databases such as Azure SQL Database do not support SQL CLR. However, if you rent a server and have SQL Server installed, it should be supported

Hello again,

Since our last conversation, we haven't heard from you.

Let me know if you need further assistance.

Best regards,

Jon

Awesome,

Yeah this line is in our install script

EXEC sp_configure 'clr enabled', 1

If you need more help, just let us know

Best Regards,

Jon