Home

RemoteException in sql driver

edited February 2023

There was a change made to a dev database I'm connected to. Prior to the changes, there wasn't any problems connecting and generating the context. Now I'm unable to load it at all. There are other similar database servers that don't have this problem but had the same updates.

Connecting via SSMS, I also had problems connecting and had to "Trust server certificate" to get around it. Tried setting "Accept invalid certificates" and adding TrustServerCertificate=True; to the connection string parameters in the advanced options but it's still failing. I was previously on .net 6 still but updated to the latest and using .net 7 now and still getting this issue.

Is there a cache I can clear and not lose all my connection configurations? Found some files in %localappdata%\LINQPad but not sure what's ok to remove.

7.7.2 (X64) 2023-02-14T17:09:41.6794554-08:00 Custom Data Context Driver
MissingMethodException - Constructor on type 'LINQPad.Drivers.SqlClient.SqlServerSchemaReader' not found.
Source=System.Private.CoreLib

 -System.RuntimeType System.Object CreateInstanceImpl(System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) offset: 0x10F
 -System.Activator System.Object CreateInstance(System.Type, System.Object[]) offset: 0x0
 -LINQPad.Drivers.SqlClient.SqlServerSchemaReader LINQPad.Drivers.SqlClient.SqlServerSchemaReader CreateNew() offset: 0x15
 -LINQPad.Drivers.SqlClient.SqlServerSchemaReader+<>c__DisplayClass37_0 LINQPad.Extensibility.DataContext.DbSchema.Database <GetDatabase>b__1(LINQPad.Extensibility.DataContext.IConnectionInfo) offset: 0x0
 -System.Linq.Enumerable+WhereSelectArrayIterator`2 Boolean MoveNext() offset: 0x3A
 -System.Collections.Generic.List`1 Void InsertRange(Int32, System.Collections.Generic.IEnumerable`1[T]) offset: 0xEA
 -LINQPad.Drivers.SqlClient.SqlServerSchemaReader LINQPad.Extensibility.DataContext.DbSchema.Database GetDatabase(LINQPad.Extensibility.DataContext.DataContextDriver, LINQPad.Extensibility.DataContext.IConnectionInfo, LINQPad.Drivers.LinkedDatabase, Boolean, System.String) offset: 0x3D4
 -LINQPad.Drivers.SqlClient.SqlServerSchemaReader LINQPad.Extensibility.DataContext.DbSchema.Database GetDatabase(LINQPad.Extensibility.DataContext.DataContextDriver, LINQPad.Extensibility.DataContext.IConnectionInfo) offset: 0x1
 -LINQPad.Drivers.LinqToSql.DynamicDriver System.Collections.Generic.List`1[LINQPad.Extensibility.DataContext.ExplorerItem] GetSchemaAndBuildAssembly(LINQPad.Extensibility.DataContext.IConnectionInfo, System.Reflection.AssemblyName, System.String ByRef, System.String ByRef) offset: 0x27
 -LINQPad.Extensibility.DataContext.DynamicDataContextDriver LINQPad.Extensibility.DataContext.DynamicSchemaResult GetSchemaAndBuildAssemblyInternal(System.String, System.String) offset: 0x28

7.7.2 (X64) 2023-02-14T17:09:41.6875000-08:00 GuiAppHost
[Thread: Name='.NET ThreadPool Worker' State=MTA IsBackground=True Pooled=True Main=False] RemoteException - MissingMethodException - Constructor on type 'LINQPad.Drivers.SqlClient.SqlServerSchemaReader' not found.
Source=System.Private.CoreLib

 -System.RuntimeType System.Object CreateInstanceImpl(System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) offset: 0x10F
 -System.Activator System.Object CreateInstance(System.Type, System.Object[]) offset: 0x0
 -LINQPad.Drivers.SqlClient.SqlServerSchemaReader LINQPad.Drivers.SqlClient.SqlServerSchemaReader CreateNew() offset: 0x15
 -LINQPad.Drivers.SqlClient.SqlServerSchemaReader+<>c__DisplayClass37_0 LINQPad.Extensibility.DataContext.DbSchema.Database <GetDatabase>b__1(LINQPad.Extensibility.DataContext.IConnectionInfo) offset: 0x0
 -System.Linq.Enumerable+WhereSelectArrayIterator`2 Boolean MoveNext() offset: 0x3A
 -System.Collections.Generic.List`1 Void InsertRange(Int32, System.Collections.Generic.IEnumerable`1[T]) offset: 0xEA
 -LINQPad.Drivers.SqlClient.SqlServerSchemaReader LINQPad.Extensibility.DataContext.DbSchema.Database GetDatabase(LINQPad.Extensibility.DataContext.DataContextDriver, LINQPad.Extensibility.DataContext.IConnectionInfo, LINQPad.Drivers.LinkedDatabase, Boolean, System.String) offset: 0x3D4
 -LINQPad.Drivers.SqlClient.SqlServerSchemaReader LINQPad.Extensibility.DataContext.DbSchema.Database GetDatabase(LINQPad.Extensibility.DataContext.DataContextDriver, LINQPad.Extensibility.DataContext.IConnectionInfo) offset: 0x1
 -LINQPad.Drivers.LinqToSql.DynamicDriver System.Collections.Generic.List`1[LINQPad.Extensibility.DataContext.ExplorerItem] GetSchemaAndBuildAssembly(LINQPad.Extensibility.DataContext.IConnectionInfo, System.Reflection.AssemblyName, System.String ByRef, System.String ByRef) offset: 0x27
 -LINQPad.Extensibility.DataContext.DynamicDataContextDriver LINQPad.Extensibility.DataContext.DynamicSchemaResult GetSchemaAndBuildAssemblyInternal(System.String, System.String) offset: 0x28
 -System.RuntimeMethodHandle System.Object InvokeMethod(System.Object, Void**, System.Signature, Boolean) offset: 0xFFFFFFFF
 -System.Reflection.MethodInvoker System.Object Invoke(System.Object, IntPtr*, System.Reflection.BindingFlags) offset: 0x54

Source=System.Private.CoreLib

 -System.Runtime.ExceptionServices.ExceptionDispatchInfo Void Throw() offset: 0x11
 -System.Runtime.CompilerServices.TaskAwaiter Void ThrowForNonSuccess(System.Threading.Tasks.Task) offset: 0x0
 -System.Runtime.CompilerServices.TaskAwaiter Void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) offset: 0x28
 -System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter TResult GetResult() offset: 0x0
 -LINQPad.DataContextManager+<FetchDCInfoCore>d__32 Void MoveNext() offset: 0x4E9


   INNER: MissingMethodException - Constructor on type 'LINQPad.Drivers.SqlClient.SqlServerSchemaReader' not found.
   Source=System.Private.CoreLib

      at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
      at System.Activator.CreateInstance(Type type, Object[] args)
      at LINQPad.Drivers.SqlClient.SqlServerSchemaReader.CreateNew()
      at LINQPad.Drivers.SqlClient.SqlServerSchemaReader.<>c__DisplayClass37_0.<GetDatabase>b__1(IConnectionInfo lr)
      at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
      at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
      at LINQPad.Drivers.SqlClient.SqlServerSchemaReader.GetDatabase(DataContextDriver driver, IConnectionInfo cxInfo, LinkedDatabase serverLinkedDb, Boolean sameServerLink, String systemSchema)
      at LINQPad.Drivers.SqlClient.SqlServerSchemaReader.GetDatabase(DataContextDriver driver, IConnectionInfo cxInfo)
      at LINQPad.Drivers.LinqToSql.DynamicDriver.GetSchemaAndBuildAssembly(IConnectionInfo cxInfo, AssemblyName assemblyToBuild, String& nameSpace, String& typeName)
      at LINQPad.Extensibility.DataContext.DynamicDataContextDriver.GetSchemaAndBuildAssemblyInternal(String repositoryData, String assemblyPathToBuild)
      at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
      at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

LINQPad 7 v7.7.2 x64 beta
Host runtime version: 6.0.14
Default query runtime version: 7.0.3
Default query reference assembly version: 7.0.3
Roslyn Version: 4.4.0-6.22561.11
FSharp.Compiler.Service version: 41.0.1.0
NuGet client version: 6.1.0.106
Results rendering engine: Edge Chromium Engine 109.0.1518.78 (WebView2)

Comments

Sign In or Register to comment.