SSIS execution and deployment error "System.IO.FileLoadException: Could not load file or assembly" - sql-server

I've a few SSIS deployed to SQL 2012 since last year, all up and running without any issue. This error started to prompt
A .NET Framework error occurred during execution of user-defined routine or aggregate "set_system_informations":
System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnection'
threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The paging file is too small for this operation to complete. (Exception from HRESULT: 0x800705AF)
System.IO.FileLoadException:
at System.Data.SqlClient.SqlConnection..cctor()
System.TypeInitializationException:
at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
at Microsoft.SqlServer.IntegrationServices.Server.SystemInformations.SetSystemInformations(SqlInt64 operationId)
. Source: .Net SqlClient Data Provider
It just failed to run, I tried to deploy again to SQL and similar error appear as follows
A .NET Framework error occurred during execution of user-defined routine or aggregate "deploy_project_internal":
System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnection'
threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The paging file is too small for this operation to complete. (Exception from HRESULT: 0x800705AF)
System.IO.FileLoadException:
at System.Data.SqlClient.SqlConnection..cctor()
System.TypeInitializationException:
at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
at Microsoft.SqlServer.IntegrationServices.Server.ServerConnectionControl.GetOperationInfo(SqlInt64 operation_id, OperationType type, ServerOperationStatus status, Int64& object_id)
at Microsoft.SqlServer.IntegrationServices.Server.ServerConnectionControl.checkParameters(SqlInt64 object_id, SqlInt64 operation_id, OperationType type)
at Microsoft.SqlServer.IntegrationServices.Server.ServerApi.DeployProjectInternal(SqlInt64 deployId, SqlInt64 versionId, SqlInt64 projectId, SqlString projectName)
. (.Net SqlClient Data Provider)
I've no problem to run the SSIS from the VS2017(SSDT) directly, just can't deploy and get it run on server. I'm not sure what is the root cause of this, all running fine yesterday and start throwing error today.
Anyone encounter this issue before?

You might have referenced a different version of System.Configuration. It could be added as a dependency by another library. It is possible that the version number has jumped during this time and you are referencing older versions. Anyway, you can overwrite the version in your csproj.

Related

Not able to deploy SSIS package

When trying to deploy the package, got the error like below: Please help
A .NET Framework error occurred during execution of user-defined routine or aggregate "encrypt_binarydata":
System.IO.FileLoadException: Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
Not enough storage is available to process this command. (Exception from HRESULT: 0x80070008)
System.IO.FileLoadException:
at Microsoft.SqlServer.IntegrationServices.Server.Security.CryptoGraphy.CreateSymmetricKey(String algorithm)
at Microsoft.SqlServer.IntegrationServices.Server.Security.CryptoGraphy.EncryptBinaryData(SqlString algorithmName, SqlBytes key, SqlBytes IV, SqlBytes binaryData)
. (Microsoft SQL Server, Error: 6522)
I want to successfully deploy the package

PostgreSQL connection issue from LLBLGen via Npgsql

We are trying to configure connection to PostgreSQL database (version 9.4.9) in LLBLGen Pro v 5.9.2 but we have following error:
Exception information.
LLBLGen Pro version: v5.9. Build: 5.9.2
Exception details:
Message: Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Source: Npgsql Stack trace: at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.g__OpenLong|0() at Npgsql.NpgsqlConnection.Open(Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlConnection.Open() at SD.LLBLGen.Pro.Gui.Controls.WizardPages.MetaDataRetrievalWizard_Step_ConnectionData.TestConnectionData(Boolean showSuccess)
Inner exception:
stack trace: LLBLGen Pro version 5.9. Build 5.9.2 -----[Core exception]-------------------- at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.g__OpenLong|0() at Npgsql.NpgsqlConnection.Open(Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlConnection.Open() at SD.LLBLGen.Pro.Gui.Controls.WizardPages.MetaDataRetrievalWizard_Step_ConnectionData.TestConnectionData(Boolean showSuccess)
Please advise.
Many thanks.

Visual Studio Community 2015 cannot load XAML

I am able to use Visual Studio 2013 with my WPF application.
However when I try opening it with Visual Studio 2015 Community Edition i got the following error:
Intellisense could not be initialized due to the following error: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.LanguageServices, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.LanguageServices, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.Metadata.ManagedTypeResolverService..ctor(IServiceProvider provider)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.Package.XamlLanguagePackage.<Initialize>b__10_3(IServiceContainer c, Type t)
at Microsoft.VisualStudio.Shell.Package.GetService(Type serviceType)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.Package.XamlLanguagePackage.GetService(Type serviceType)
at Microsoft.VisualStudio.Shell.Package.System.IServiceProvider.GetService(Type serviceType)
at Microsoft.VisualStudio.DesignTools.DesignerHost.HostServices.ServiceProviderExtensions.GetRequiredService[T](IServiceProvider serviceProvider, Type serviceType)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlFileInformationService.CreateFileInformationContext(IHostSourceItem sourceItem)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.GetFileContextScope(String fileName, IVsTextLines textLines, IXamlFileInformationContext& fileContext)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.EnsureBufferCache(IVsTextLines textLines)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.CreateSource(IVsTextLines textLines)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
I enabled the registry parameter and then got the below error:
Intellisense could not be initialized due to the following error: System.NotSupportedException: Required Service 'ITypeResolverService' not found.
at Microsoft.VisualStudio.DesignTools.DesignerHost.HostServices.ServiceProviderExtensions.GetRequiredService[T](IServiceProvider serviceProvider, Type serviceType)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlFileInformationService.CreateFileInformationContext(IHostSourceItem sourceItem)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.GetFileContextScope(String fileName, IVsTextLines textLines, IXamlFileInformationContext& fileContext)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.EnsureBufferCache(IVsTextLines textLines)
at Microsoft.VisualStudio.DesignTools.Xaml.LanguageService.XamlLanguageService.CreateSource(IVsTextLines textLines)
Where do I find and enable this service?
NOTE:
I have already repaired the Visual Studio without success
I have already uninstalled and installed the Visual Studio without success

Windows Azure Error - Could not load file or assembly MFCMIFC80

I have created an Angular/WebAPI/MongoDb project and using StructureMap for dependency injection and I have it published to a private BitBucket account.
I have create an Azure Webapp and set it up to auto deploy whenever I commit a change to my BitBucket repo.
When I run it locally (from Visual Studio) my main page is:
http://localhost:37071/index.html#/
It makes API calls to http://localhost:37071/api/stock?stkSymbol=ORCL successfully.
However, when it is deployed, my page loads successfully at: http://myAzureProject.azurewebsites.net/index.html#/
However, all API calls to: http://myAzureProject.azurewebsites.net/api/stock?stkSymbol=ORCL
Fail with this error message:
Server Error in '/' Application.
Could not load file or assembly 'MFCMIFC80, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'MFCMIFC80, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'MFCMIFC80, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'MFCMIFC80, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.]
System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes) +0
System.Reflection.RuntimeAssembly.GetExportedTypes() +21
StructureMap.Graph.TypePool.<.ctor>b__0(Assembly assembly) +10
StructureMap.Util.LightweightCache`2.get_Item(TKey key) +65
StructureMap.Graph.<>c__DisplayClass3.<For>b__2(Assembly x) +37
System.Linq.<SelectManyIterator>d__14`2.MoveNext() +232
StructureMap.StringExtensions.Each(IEnumerable`1 enumerable, Action`1 action) +140
StructureMap.Graph.AssemblyScanner.ScanForTypes(TypePool types, PluginGraph pluginGraph) +128
StructureMap.<>c__DisplayClass2.<RunConfigurations>b__1(AssemblyScanner x) +21
StructureMap.StringExtensions.Each(IEnumerable`1 enumerable, Action`1 action) +131
StructureMap.PluginGraphBuilder.RunConfigurations() +143
StructureMap.PluginGraphBuilder.Build() +13
StructureMap.PipelineGraph.For(Action`1 action) +49
myAzureProject.DependencyResolution.IoC.Initialize() +82
myAzureProject.App_Start.StructuremapMvc.Start() +10
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +192
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +155
WebActivatorEx.BaseActivationMethodAttribute.InvokeMethod() +57
WebActivatorEx.ActivationManager.RunActivationMethods(Boolean designerMode) +350
WebActivatorEx.ActivationManager.Run() +78
[InvalidOperationException: The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..]
System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +547
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +132
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +102
System.Web.Compilation.BuildManager.ExecutePreAppStart() +153
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +521
[HttpException (0x80004005): The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9930568
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.36215
I'm not familiar with what MFCMIFC80 is or what I need to do in order to be able to get it deployed to my Azure web app.
Any help would be appreciated.
Thanks!
MFCMIFC80.dll is an MFC library (https://en.wikipedia.org/wiki/Microsoft_Foundation_Class_Library). It most probably is a requirement for your MongoDB drivers. As I do not recall any dependency on MFC for regular Web API als using AngularJS.
You cannot deploy MFC on Azure Web Apps (former Web Sites).
Look for alternative MongoDB drivers which do not have dependencies on MFC.
Another reason for this error could be that in your project you refernece .NET 2.0 assemblies, while your main project targets .NET 4.0. Which may be the case with the MongoDB driver indeed (it may be only compiled against .NET 2.0 and it would cause the issues).
So go through all of your referneces (incl. StructureMap and MongoDB drivers) to make sure that all your refenreced assemblies are targetinng .NET 4.0 and not .NET 2.0.
Note that although .NET 4.0 actually runs in the .NET 2.0 Runtime environment, there still might be issues when referencing .NET 2.0 assemblies from a .NET 4.0 targeted project.
Finally figured it out. In my solution, I have one line to tell structuremap to scan for assemblies from path.
scan.AssembliesFromPath(Environment.CurrentDirectory);
Removing this line resolves the issue.

Postgres entity framework 6 code first issue

Ok, here are the exact steps I followed:
Installed postgres 9.3 locally, created database 'testdb', added login role with uname/pass test
Installed Setup_Npgsql-2.2.3.0-r2-net45.exe from here
Created a new class library (PGTest) in vs 2012, installed "npgsql for entity framework" from nuget package manager
Modified app.config to match this
Added Models folder, added two files: DataContext.cs and Region.cs
In package manager console ran "enable-migrations", "add-migration Initial", "update-database -script"
Got the following error
PM> update-database -script
Applying explicit migrations: [201501282207413_Initial].
Applying explicit migration: 201501282207413_Initial.
System.Runtime.InteropServices.COMException (0x8004000C): User canceled out of save dialog (Exception from HRESULT: 0x8004000C (OLE_E_PROMPTSAVECANCELLED))
Server stack trace:
at EnvDTE.ItemOperations.OpenFile(String FileName, String ViewKind)
at System.Data.Entity.Migrations.Utilities.DomainDispatcher.OpenFile(String fileName)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.Data.Entity.Migrations.Utilities.DomainDispatcher.OpenFile(String fileName)
at System.Data.Entity.Migrations.Extensions.ProjectExtensions.NewSqlFile(Project project, String contents)
at System.Data.Entity.Migrations.UpdateDatabaseCommand.<>c__DisplayClass2.<.ctor>b__0()
at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
User canceled out of save dialog (Exception from HRESULT: 0x8004000C (OLE_E_PROMPTSAVECANCELLED))
In visual studio, going to SQL menu, Transact-SQL Editor, New Query... It gives you a dialog about the tools not working with the server installed. Installing SQL Server Data Tools - December 2012 update (http://msdn.microsoft.com/en-us/jj650015) fixed the problem.
The dialog should provide you a link to the SQL Server Data Tools.

Resources