Crystal report error - System.AccessViolationException: Attempted to read or write protected memory. - vb.net

I keep getting this Crystal report error while trying to view the report from an application hosted in IIS.
The code -
ceEnterpriseService = ceSession.GetService("", "InfoStore")
ReportApplicationFactory = ceSession.GetService("RASReportFactory").Interface
ceInfoStore = New InfoStore(ceEnterpriseService)
The web server throws an unhandled win exception as soon as it passes "New InfoStore(ceEnterpriseService)" line.
I have Crystal enterprise 10 installed and am using VS 2012/.NET 4.5. I have to use Crystal enterprise 10 since that is being used by the client. I also had a different version installed and un installed some time back which broke some of the reports while I checked in.
Resolved that by asking the clients to load their set of dlls.
Could this error also be an outcome of incorrect versions? How do I check what version is required.
I'm kind of lost in this. Any help would be appreciated.
Thanks.

Ok. This is fixed, in case someone faces this issue.
There was some issue with the crystal report designer on my development machine. Fixed that and the reports worked fine.

Related

MysqlDataAdapter.Update not throwing exception

In my application I have drag and drop functionality for a TreeView and for a DataGridView.
It works great and I have no issues with the code.
I use Visual Basic - Visual Studio 2017 Community on Windows 10 Home Single Language 64-bit. After Building Release it also works fine on Windows 10 when running release.
I then copy it to a Windows 2008 R2 Virtual server where it is run by each user through Remote Desktop.
The strange issue I have is that the TreeView drag and drop functionality works 100%, but the DataGridView seems to ignore my drop - only on the Server.
I can't find anything on the net that relate to this.
Any ideas how I can troubleshoot this issue?
======================================================================
After tediously adding messages between lines I came to the conclusion that it is the MySqlDataAdapter.Update() line that is not executing.
No exception, just stops at this line and throws me out of the DataGridView.DragDrop Sub.
So the new question is, how do I catch that error after compile?
I think I probably asked the question too quickly, apologies.
For anyone that does not get an exception from MySqlDataAdapter, check permission on triggers.
In this case on my development computer root user can access from %.
On the server root is configured for access from localhost only.
One of the triggers was defined "CREATE DEFINER=root#% TRIGGER..." and after changing it to root#localhost it worked.

Application pool account permission to run RestSharp

Recently my web server (windows server 2012 R2) got several Windows updates. Since then I am not able to run a code involving RestSharp. It fails whenever I try to initialize "new RestRequest()". Windows event log registers this error: "User does not have permission to run the resource"
I have development environment with Windows 7 where I don't see these updates. My code runs fine.
I have looked into the update history on the server and looks like the following updates may be creating these problems.
KB3074548
KB3074228
KB3074545
I have looked into documentation of RestSharp to find out whether any specific permission needed on the application pool running RestSharp code. I could not find out anything.
I am wondering whether anyone else having this problem and/or may have any knowledge about permissions required to run RestSharp request.
Really appreciate any help.
It is now working. It was just a deployment issue.

Microsoft reporting services crashes when trying to print from internet explorer 11

I just upgraded my browser to IE 11 and everytime I try to print a report from reporting services, the browser stops working and crashes. For some of our users, the print button is even disabled.
Is anyone else having this problem and does anyone know of a fix? Thanks.
Most likely SSRS is running ASP.Net 4.0 which has issues with browser sniffing IE 11. So you have a few options, The "easiest" being upgrade to .Net 4.5.
You could also follow the steps here if that is not an option for you.
https://stackoverflow.com/a/19855256/3096369
That would allow ASP.Net to successfully sniff IE 11.
Let me guess, you are SQL Server R2 without SP2. I had to upgrade to Sql Server 2008 R2 SERVICE PACK 2.
The version of RsClientPrint you get with R2/SP2 is 10.50.4000, while
the version I had was 10.50.1600.
ReportViewer's Print Button Incompatible with IE 10?

The remote procedure call failed and did not execute. (Exception from HRESULT: 0x800706BF)

I did ask this question at Microsoft forums but did not get any reply. I am asking here hoping to get an answer. My query is detailed below.
I have a C# application which manages user's on AD using ADSI APIs. For managing user's password, I make use of IADsUser.SetPassword(string NewPassword) of Interop.ActiveDs.dll.
The issue I am facing is only when domain controller is installed on Windows 2008 enterprise SP2 OS. It is not reproducible on Windows 2008 R2.
When I try setting the password one user by one, there is no issue at all. But if I create threads for each user and then each thread calls this API I get "The remote procedure call failed and did not execute. (Exception from HRESULT: 0x800706BF)" .
Apart from this, I do not see anything on the event viewer on the DC or anywhere. This something similar to what is mentioned here http://support.microsoft.com/kb/960007 which is for 2003, has someone seen this issue on 2008 enterprise SP2 ? Is this a known issue ?
I am installing all the updates which are pending using windows updates, hopefully it might resolve. Can someone please answer if they have seen this issue and what were the steps taken? Thanks.
I ran into something similar running an ASP.NET web application in VS 2015, AND I also had a LightSwitch application running in VS 2012 under different credentials. Rebooting did not do the trick. Enabling native code debugging did:
Debugging unmanaged code while debugging managed code
I did not do anything except turn it on. My app ran fine after that. I went ahead and turned it off and it still ran fine. Whatever works.

Silverlight Application gives 4004 error when trying to use RIA services

I have written a Silverlight application that is basically an account registration form. I have been able to successfully deploy this to one of our production servers running windows server 2008/IIS7. While this took some time to do, I was able to work through and solve the issues that came up fairly easily. Now I am trying to deploy the application on our main production server. This server is running windows 2003/IIS6 and this is where I have hit some problems.
I have solved most of the issues and now the silverlight application will load and I can see the form for a few seconds before it disappears. I believe during this time it is trying to load data from the database using the RIA services.
In IE I get the following error:
Webpage error details
Message: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.Windows.Markup.XamlParseException:
System.Windows.Markup.XamlParseException:
System.Windows.Markup.XamlParseException:
Cannot find a Resource with the Name/Key ApplicationResources [Line: 6 Position: 9]
I believe it must be a configuration issue in IIS6 because the app works fine on IIS7 but I am drawing a blank as to what to try. I have spent hours trying to find a solution to this particular problem and while others have mentioned getting this problem the answers always tend to be non-specific in nature.
This is what I have done so far:
Added New Application Pool for .NET 4.
Set the website to use .NET 4 on the ASP.NET tab (nearly had heart failure when this did an iisreset).
Added the MIME types for Silverlight .xaml, .xap, etc.
Unchecked Integrated Windows Authentication (was giving an error when checked).
Give Execute permissions to Scripts and Executables.
Recycled the application pool.
The one thing I have seen suggested but have not tried is an iisreset, and while I am not entirely convinced that doing this would solve the problem, we have scheduled this to be done tonight (if I cannot find a solution before then).
So basically I am wondering if anyone out there has seen this problem and knows how to solve it?
UPDATE 1: We tried an iisreset last night and as I expected this did not solve the problem.
Okay I have solved the problem. As suggested I did a WCF trace on the application. This highlighted the REAL problem straight away, which was 'The SELECT permission was denied on the object...'. Once I fixed this the application works as I expected. It turns out that a colleague of mine had already made this permission change on our other server (running IIS7) so that was why it worked there (this is bad - I know).
Also it didn't help that the javascript error I was receiving on the client side (shown in the question) had nothing to do with the underlying issue and led me well and truly up the garden path.