Skip to Content
0

C# application logs on to peoplesoft db on 32bit but not on 64bit

May 16, 2017 at 09:34 PM

48

avatar image
Former Member

A c# command line tool called crexport.exe works well. however, on a 64 bit windows machine is not able to authenticate to the database.

Same code completes without problem on 32 bit.

For more information see: http://stackoverflow.com/questions/43899015/crexport-exe-on-64-bit-system-faile-to-log-on-to-database

All source code is at https://github.com/aaroncalderon/Crystal-Reports-Exporter/tree/issue-logonToDatabase

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Brian Dong May 16, 2017 at 11:33 PM
1

Hi Aaron,

The tool is 32 bit so you will need a 32 bit driver for your PeopleSoft database for it to work. It won't work with a 64 bit driver.

Brian

Show 5 Share
10 |10000 characters needed characters left characters exceeded
Former Member

The PeopleSoft driver is 32 bit. The issue is that authentication to the database fails everytime.

The error I get is 'Logon Failed'. The exception name is `LogOnException`.

Any other suggestion aside from the 32 bit driver?

I know the tool is compiled as `Any CPU`. Should it be compiled as 32 bit explicitly?

Thanks

0

Yes, it needs to be explicitly compiled to targed "X86" instead of "Any CPU".

-Dell

0
Former Member

Hi Dell,

Thanks for your suggestion. I have changed my settings to copile to the target 'x86' architecture. However, I encounter the follwooing error:

The type initializer for 'CrystalDecisions.CrystalReports.Engine. ReportDocument' threw an exception. The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor() at crexport.crexport.Main(String[] args) System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() --- End of inner exception stack trace --- at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor() at crexport.crexport.Main(String[] args)

I have seach around the web but have not found a solution. e.g. Stack Overflow question not load file or assembly CrystalDecisions.ReportAppServer.ClientDoc, on this question the following suggestions are mentioned:

  1. Install the Crystal Reports Runtime [already installed]
  2. Some setup needed on IIS [I a not deploying to IIS]
  3. Change your .net profile from Client profile to to .Net Framework 4.0 [done, no change]
  4. Check your Embed Interop Types flag [get error]
    Cannot embed interop types from assembly 'c:\Windows\assembly\GAC_MSIL\CrystalDecisions.Shared\13.0.2000.0__692fbea5521e1304\CrystalDecisions.Shared.dll' because it is missing either the 'ImportedFromTypeLibAttribute' attribute or the 'PrimaryInteropAssemblyAttribute' attributec:\Windows\assembly\GAC_MSIL\CrystalDecisions.Shared\13.0.2000.0__692fbea5521e1304\CrystalDecisions.Shared.dll

Any other suggestions?

0
Former Member

Update:

So, I'm working on installing all the 32 bit versions of the softwae required to get this working.

  • .NET Framework 32bit
  • CR for VS Runtime 32bit
0
Former Member

So, basically I installed:

  • .NET Framework 32bit (offline installer has both versions)
  • CR for VS Runtime 32bit

And I compiled my tools with a target of x86.

That fixed the issue.

In other words, the tool was not 32bit. Compiling against a target of x86 made it 32bits, and along with other 32bit tools installed, it worked.

0