Error in ReportViewer after deploy ClickOnce - HRESULT: 0x80131401 - c#

I hope that will help me with this issue.
I have a problem with a application (winforms) build with .net framework 4.5 and ReportViewer 11 (Reporv Viewer 2012). Ago few weeks I deploy using Windows Azure and install to clients, but when i run a report show me an exception.
**An error occurred during local report processing.
Failed to load expression host assembly. Details: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)**
When I deploy in network (LAN) was working fine, but when I deploy via internet i get this error, this error only occurs when i start the application via shortcut .appref-ms, but if I start application executing .exe file show report correctly.
Some else have this problem and how solve?
Thanks.

I found my problem.
I solve this only comment this line, because i dont use ngen ;).
i just comment attribute [LoaderOptimization(LoaderOptimization.MultiDomainHost)] in Main method. This works fine for me, check if you have and comment ;).

Related

'Oracle.DataAccess.Client.OracleConnection' threw an exception, WinForms Application

I have a WinForms application in a .NET Framework 4.5.2 and an Oracle 10g database. This application works perfectly fine when I debug it using VS 2017, but when I deploy it as a ClickOnce application [using ClickOnce Deployment Manifest] it does not work and I keep getting the following error.
Image of the error upon connecting
relevant error text follows:
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleCommand' threw an exception. ---> Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client
at Oracle.DataAccess.Client.OracleInit.Initialize()
at Oracle.DataAccess.Client.OracleCommand..cctor()
--- End of inner exception stack trace ---
It also runs perfectly fine when running the it from bin/Release folder, how can I make so that my deployed application runs like my local .exe in my repo.
And an additional piece of info, this WPF application is just a menu so that it runs my other WinForms applications, they work perfectly fine even when published, I have ensured that all applications are targeting an (x86) architecture and that all the ClickOnce settings are the same, to no avail.
Or can I even recreate the error when debugging so that I can fix? I tried forcing 64 - bit mode
(since that is what my machine is) in the properties of the project, but it does not even load. In the ClickOnce application it loads to the log-in page, but messes up when establishing a connection after the user has entered their credentials.
This is my first post so please fell free to request any more info and let me know if I have been unclear in anyway.
Thank you for the help in advance !
The issue has been resolved, but if anyone else come across it here is the solution, you have to find and add the appropriate DLL's manually into your project. I guess as mentioned in other answers, when the error says "...Client is not compatible..." it can also mean that the appropriate files do not exist.

VS2015 C# Localhost ASHX Error (But it works on Server?) HRESULT 0x80131401

I'm building a website in VS2015 (C# using Razor)
I see many posts where people say that they receive this error on their server, but not localhost - my issue is the opposite. I'm seeing this error in every *.ashx file preamble in this specific Website only while running Localhost on my development machine:
ASP.Net runtime error: Loading this assembly would produce a different grant set from other instances (Exception from: HRESULT 0x80131401)
This error prevents me from using Intellisense in the file - and I really need it for this next handler.
What I've Determined: - The issue is specific to this Website. I have other websites that do not produce this error, so there isn't a need to modify registry or change PC configurations.
What I've tried:
IISReset (Restart PC) [*before I realized problem was local]
Changing Registry by adding LoadingOptimizer DWORD [*before I realized problem was local]
Compared XML of a working Web.config file. (Other than assembly differences I played around with other differences and still nothing)
Any suggestions?

"Unable to find an entry point named 'sqlite3_open_v2' in DLL 'sqlite3'.":""

I am working on a windows forms application. when I run the application on windows 8 (VS2012), the application runs upto an extent and then crashes, giving the exception "{"Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"}".
I downloaded the 32 bit SQLite3 and added it to my solution. thereafter I got the error
{"Unable to find an entry point named 'sqlite3_open_v2' in DLL
'sqlite3'.":""}.
I am running my application in the release mode.
kindly help me fix this issue!!
Is your application running as x86 or x64? You may want to check your build configuration.

BCL.XPRB dll isn't initializing in C#.Net application

I am trying to resolve an initialization error for the optimizer library. I have a license for and installed Xpress-IVE 64bit studio, however, I need to link and use xprb facilities in a C#.Net application that is built in VS2010 and runs on IIS.
I copied xprb.dll and xprbdn.dll to application bin folder for deployment, and added them as references. Yet when the application calls XPRB.init(), it throws exception
Unable to load DLL 'xprb.dll': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
Any suggestions on what could be missing?
It turned out to be a Windows/.Net/general instability issue. The license, although installed, wasn't found by .Net, which decided to blow up as if the dll wasn't available. Finally was resolved mysteriously after a few system reboots and updates.
I had the same issue, but running windows 8.1, xpress-ive 64bit and vs2013 with c#. I could run IVE and solve problems from there, but i got "An unhandled exception of type 'Additional information: Unable to load DLL 'xprb.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" error in runtime when running using bcl in VS. What solved the problem in my case was going through the necessary environment variables and directing them to the correct xpress folders (environment variables xpress, path and mosel.dso).

Could not load file or assembly 'Interop.QBFC8Lib' or one of its dependencies

I am using a quickbooks sdk that containst the QBFC8Lib dll
everything works fine on my dev machine.
when I publish to my live server I get the following error:
System.BadImageFormatException: Could not load file or assembly 'Interop.QBFC8Lib' or one of its
enter code heredependencies. An attempt was made to load a program with an incorrect format
I have the sdk installed on both my dev machine and the live machine. still getting this error
You areexactly right. on the server I went to the application pool for this application and needed to set enable 32 bit applications to true. That did it. Thanks for your help

Categories