An error occurred in the Microsoft .NET Framework while trying to load assembly id 65536

Nicky 116 Reputation points
2020-10-07T10:41:41.68+00:00

We have moved our SQL Database to SQL Server on Azure VM.

I have already ran these

USE SSISDB
GO
EXEC sp_changedbowner 'sa'

Alter database SSISDB SET Trustworthy ON

I am trying to deploy the package and create a folder but I still gettign this error:

An error occurred in the Microsoft .NET Framework while trying to load assembly id 65536. 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 'microsoft.sqlserver.integrationservices.server, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' 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)
(Microsoft SQL Server, Error: 10314)

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,407 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Gregory Liénard 71 Reputation points
    2021-08-04T08:48:03.633+00:00

    @Nicky I had the same problem. It's all about the order of execution:

    1. First make sure that the database is CLR enabled: USE [myDB]
      EXEC sp_configure 'clr enabled', 1
      RECONFIGURE
    2. Set it to thrusthworthy: ALTER DATABASE myDB SET TRUSTWORTHY ON;
    3. Change owner to SA: EXEC sp_changedbowner 'sa'

    That should do it.

    14 people found this answer helpful.

  2. Monalv-MSFT 5,891 Reputation points
    2020-10-08T01:24:57.753+00:00

    Hi @InderjeetKaur-3272,

    Could you please share the version of your SQL Server?

    May I know if you Install Integration Services(SSIS)?

    Best Regards,
    Mona

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Nicky 116 Reputation points
    2020-10-09T08:30:40.43+00:00

    @Monalv-MSFT My version of SQL server is 15.0.18338.0.

    Yes we have SSIS installed and we run packages every week using SSIS. We were trying to create one of these package.

    If I try to add any folderor new package under SSISDB, I get this error. I am not able to deploy the package.

    Thanks !


  4. Nicky 116 Reputation points
    2020-10-12T10:05:22.903+00:00

    I am not able to redeploy the package.I get this error

    An error occurred in the Microsoft .NET Framework while trying to load assembly id 65536. 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 'microsoft.sqlserver.integrationservices.server, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' 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)


  5. Kenneth W Herrscher 1 Reputation point
    2023-01-06T18:25:57.297+00:00

    We restored a database from one of Cloud Vendor's SQL server to one of our internal SQL Servers, and experienced this same error message. Gregory-Lienard's post worked for me. Thanks, Gregory-Lienard!

    0 comments No comments