Search code examples
c#asp.netsql-serverteleriktelerik-open-access

Telerik Open Access error: Exception: System.ArgumentNullException: Value cannot be null. Parameter name: converterName


I am currently experiencing an issues where a handful of queries to stored procedures hooked up via Telerik Open Access (v2015.1.87.3777) are returning the following error:

Exception: System.ArgumentNullException: Value cannot be null. Parameter name: converterName.

The error occurs at the point when the stored procedure is executed in the dynamically generated embedded .cs file of the .rlinq designer. E.g.,

IEnumerable<TestResult> queryResult = this.ExecuteQuery<TestResult>("[TestSchema].[spS_GetTestResult]", CommandType.StoredProcedure, parameterContextID, parameterReturnValue);

However, this is only happening on certain environments and not others, with seemingly the exact same config. This only started happening last night with no code changes. Prior to yesterday everything was working fine across the board.

I can reproduce the issue locally, and if I run the solution locally and point to a database server that I know works everything is fine. But if I change the connection string and point to a different server that I know doesn’t work I get the error. So the underlying code is exactly the same (given I am running it locally) with the only thing changing is the connection string. And it’s calling identical stored procedures – in fact the entire database is a clone of another that works.

I tried rolling back to previous versions of Telerik Open Access, which has had no effect. I have absolutely no idea what could’ve caused this, and no explanation why this is has surfaced, and in particular why it works on some environments, not others.

Here is the exception details.

System.ArgumentNullException was unhandled by user code HResult=-2147467261 Message=Value cannot be null. Parameter name: converterName Source=Telerik.OpenAccess.Runtime ParamName=converterName StackTrace: at OpenAccessRuntime.Relational.metadata.RelationalMappingResolver.ResolveTypeConverterName(TypeConverterName converterName) at OpenAccessRuntime.Relational.metadata.RelationalMappingResolver.CreateConverter(TypeConverterName converterName) at OpenAccessRuntime.DataReaderTypeConverterImpl.Setup(Int32 offset, Type targetType) at OpenAccessRuntime.DataReaderTypeConverterImpl.Convert(Type targetType, Int32 offset) at Telerik.OpenAccess.Data.Common.OADataReader.GetConvertedValue[T](Int32 columnIndex) at Telerik.OpenAccess.Data.Common.PropertyAccessor.Impl`2.Set(Object inst, OADataReader reader, Int32 columnIndex) at Telerik.OpenAccess.Data.Common.NonPersistentCapableMaterializer 1.d__0.MoveNext() at Telerik.OpenAccess.RT.TypedEnumerator 1.MoveNext() at System.Collections.Generic.List 1..ctor(IEnumerable 1 collection) at Telerik.OpenAccess.OpenAccessContextBase.ExecuteQuery[T](String commandText, CommandType commandType, DbParameter[] parameters) at TestProject.ORM.PresentationData.GetTestResult(Nullable 1 contextID, Int32& returnValue) in c:\Projects...\DataModels\PresentationData1.cs:line 1789 at TestProject.ORM.PresentationData.GetTestResult(Nullable 1 contextID) in c:\Projects...\DataModels\PresentationData1.cs:line 1768 at TestProject.ORM.DataHelpers.Presentation.GetTestResult(Int32 contextId) in c:\Projects...\DataHelpers\Presentation.cs:line 229 at TestProject.DataServices.PresentationService.GetTestResult(Int32 contextId) in c:\Projects...\PresentationService.svc.cs:line 404 at SyncInvokeGetTestResult(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) InnerException:


Solution

  • This was due to security updates that were rolled out on said servers. Rolling these patches back resolved the issue: The two security updates were:

    • KB3194719 (SQL)
    • KB3197873 (Windows)