We received this error yesterday.I found a few articles suggesting it was an issue with orphaned userIds, but because the database is hosted on Azure the stored procedure to access the user profiles isn't available and I'm no database expert.
One of the articles I was reading
It says it cant find assembly 'microsoft.sqlserver.types' 11.1.0.0 the version that was deployed a few weeks back was 10.0.0.0 so i updated my nuget packages but that version is only on 11.0.2
https://www.nuget.org/packages/Microsoft.SqlServer.Types/
We resolved the issue at the moment by taking a copy of the database. Its only temporarily resolved i feel and it'll happen again.
System.Data.SqlClient.SqlException : An error occurred in the Microsoft .NET Framework while trying to load assembly id 1. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error: System.IO.FileNotFoundException: Could not load file or assembly 'microsoft.sqlserver.types, Version=11.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'microsoft.sqlserver.types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException: System.IO.FileNotFoundException: at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString)