PostgreSQL connection issue from LLBLGen via Npgsql - 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.

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

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

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.

dont found package at Visual studio

when I am building universal app ,this problem is occured by visual studio 2015. How can I solve ?
System.Exception
Windows cannot install package 70733c38-2ce9-4c3f-93bb-b44ef99de628 because this package depends on another package that could not be found. This package requires minimum version 14.0.23019.0 of framework Microsoft.VCLibs.140.00.Debug published by CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US to install. Provide the framework along with this package.
at Microsoft.VisualStudio.DesignTools.HostUtility.Platform.AppContainerProcessDomainFactory.CreateDesignerProcess(String applicationPath, String clientPort, Uri hostUri, IDictionary environmentVariables, Int32& processId, Object& processData)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.ProcessDomainFactory.ProcessIsolationDomain..ctor(ProcessDomainFactory factory, IIsolationBoundary boundary, AppDomainSetup appDomainInfo, IIsolationTarget isolationTarget, String baseDirectory)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.ProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary boundary)
at Microsoft.VisualStudio.DesignTools.HostUtility.Platform.AppContainerProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary boundary)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.IsolationBoundary.Initialize()
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.IsolationBoundary.CreateInstance[T](Type type)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedObjectFactory.Initialize()
at Microsoft.VisualStudio.DesignTools.DesignerHost.Services.VSIsolationService.CreateObjectFactory(IIsolationTarget isolationTarget, IObjectCatalog catalog)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolationService.CreateLease(IIsolationTarget isolationTarget)
at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.CreateLease(IIsolationTarget isolationTarget, CancellationToken cancelToken, DesignerServiceEntry& entry, IServiceProvider serviceOverrides)
at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedTaskScheduler.InvokeWithCulture[T](CultureInfo culture, Func`2 func, CancellationToken cancelToken)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedTaskScheduler.<>c__DisplayClass10_0`1.b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
Create a new fresh universal windows app and install it
It will fix issue with your app.

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.

Razor Host installation error in dotnetnuke

I upgraded my IIS to .NET v4.0 successfully but on installing Razor Host, It shows the error like
*Error: is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: Access to the path 'C:\inetpub\wwwroot\dotnetnuke\Install\Temp\ajynte0h' is denied. ---> System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\dotnetnuke\Install\Temp\ajynte0h' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj) at System.IO.DirectoryInfo.Create() at DotNetNuke.Services.Installer.Util.WriteStream(Stream sourceStream, String destFileName) at DotNetNuke.Services.Installer.InstallFile.ReadZip(ZipInputStream unzip, ZipEntry entry) at DotNetNuke.Services.Installer.InstallerInfo.ReadZipStream(Stream inputStream, Boolean isEmbeddedZip) at DotNetNuke.Services.Installer.InstallerInfo..ctor(Stream inputStream, String sitePath) at DotNetNuke.Services.Installer.Installer..ctor(Stream inputStream, String physicalSitePath, Boolean loadManifest, Boolean deleteTemp) at DotNetNuke.Modules.Admin.Extensions.Install.LoadPackage(String package) at DotNetNuke.Modules.Admin.Extensions.Install.Initialize() at DotNetNuke.Modules.A*dmin.Extensions.Install.OnLoad(EventArgs e) --- End of inner exception stack trace ---
help me to solve this error?????
How did you udpgrade to 4.0? Did you change the app pool? or did you change the framework for the app pool, and kept the identity the same? If the first: Have you checked that you app identity has sufficient rights on the application?
If the second: Try to re-install the razor module.

Resources