cancel
Showing results for 
Search instead for 
Did you mean: 

Referencing DLL's Natively in .NET Application

Former Member
0 Kudos

I am running an application written in C# in VS 2013.  I am trying to reference the DLL's CrystalDecisions.Enterprise.Framework and CrystalDecisions.Enterprise.InfoStore. They are 64 bit DLL's, the file version is 12.0.0.0.  My machine is running Windows 7, 64 bit.  When I reference these DLL's in my application and run it in VS IDE, I get the following error:

Could not load file or assembly 'BusinessObjects.Enterprise.Sdk' or one of its dependencies. An attempt was made to load a program with an incorrect format.


Does anyone have any tips as to how to correctly reference these DLL's in a .NET application?

I am trying to run code that looks as follows to get a serialized session:

            SessionMgr session_mgr = new SessionMgr();

            EnterpriseSession session = session_mgr.Logon(userName, password, server, auth);

            string session_str = session.SerializedSession;

            string SessionURL = HttpUtility.UrlEncode(session_str);

Also, is there some other way to get a serialized session, i.e can it be done through a RESTFul services command?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

So I made a change to the setting "Use 64 bit version of IIS express" in Visual Studio and got past the original error.  Now it is doing this:

Could not load file or assembly 'BusinessObjects.Enterprise.Sdk.ZipLib.netmodule' or one of its dependencies. The specified module could not be found.


I checked the BIN directory for the project and it does contain the following files:

BusinessObjects.Enterprise.Sdk.dll

BusinessObjects.Enterprise.Sdk.ebus.netmodule

BusinessObjects.Enterprise.Sdk.fssl.netmodule

BusinessObjects.Enterprise.Sdk.netmodule

BusinessObjects.Enterprise.Sdk.Ssl.netmodule

BusinessObjects.Enterprise.Sdk.ZipLib.netmodule

BusinessObjects.Foundation.Logging.dll

As well as:

CrystalDecisions.Enterprise.Framework.dll

CrystalDecisions.Enterprise.InfoStore.dll

CrystalDecisions.Enterprise.PluginManager.dll

I don't have CrystalDecisions.Enterprise.PluginManager.dll currently referenced in the project. 


Any ideas about the error message?

former_member188030
Active Contributor
0 Kudos

Hi Dan,

VS 2013 was never tested with BO 3.1.

Could you test the same workflow with VS 2005 or VS 2008. This would exclude any posibility of compatibility issues.

Also, make sure you target 32 bit platform in your app. Set the target platform to X86.

Thanks,

Bhushan

Former Member
0 Kudos

Hi Bhushan,

We are running BO 4.1 SP 4 far as I know.  We don't use or have VS 2005 or VS 2008 anymore in our development environment.  I got past the error in the first post, so it is no longer a 64 bit vs 32 bit issue.  My second post in this thread is what's happening now.  It's now saying this just as the app is about to start:

An exception of type System.IO.FileNotFoundException occurred in mscorlib.dll but was not handled in user code.

Could not load file or assembly 'BusinessObjects.Enterprise.Sdk.ZipLib.Netmodule' or one of its dependencies.  The specified module could not be found.


I have this file in the BIN directory of my project, but still not working.

0 Kudos

Must use the BOE 4.1 .NET SDK package as well which you can get from Service Market Place.

You cannot mix primary versions of the SDK and BOE.

Don

Former Member
0 Kudos

Hi Don,

Pretty sure our .NET SDK package is 4.1 SP4 as well.  I don't think we have separate versions, it all comes as one package far as I know.  Would you think that is producing the error in my second post on this thread, that .NET can't find a file/module/assembly it is looking for?

Dan

0 Kudos

Did you download the 4.1 .NET SDK from Service Market place? It's not included in the Client Tools installer.

Don

Former Member
0 Kudos

Don,

Yes, we downloaded the .NET SDK v4.1 SP4 from the Service Market Place, per our BO Architect here at Toll.  Do you think this has a bearing on the error I am getting in my 10/2/15 12:00am post?

Dan

0 Kudos

Good,

It should work then. In VS if you are updating an older project it should ask if you want to update and back folder.... but then all references should be pointing to the new version 14 assemblies.

If you create a new project, Select WEB form and drop the Viewer onto the form you should then be able to add all of the 14 assemblies.

If that doesn't work then try doing a repair install under a local Admin account.

If that fails then log a case in SMP and a Rep will contact you and use a Go To Assist session to have a look around.

Don

Former Member
0 Kudos

Hi Don,


How do I log a case in SMP?  What is the URL for SMP?

What we're doing is this:  We have an existing application which has both Webforms and MVC, written in C#.  In both the Webforms and MVC sections of the application, we don't use the Viewer control, but are just dropping an HTML iframe onto a page, then setting it's "SRC" attribute to a URL The URL points at a BO Report, and contains a session or token.

We are trying to use the SDK to get a serialized session.  This is because we have had an issue with multiple reports run on one page.  When we try to do this, one or more of the reports errors out and doesn't run.  We were given the serialized session as workaround/fix for this, but we haven't been directly using the SDK directly in our app for a couple of years.  The DLL's are housed here on a central server, and we just have a URL which points to those DLLs on the server, acting as a front end gateway. This gives us a session/token.  We use this URL to run all our reports, thus bypassing direct use of the SDK in our app.  

I installed the SDK, v4.1 SP4 on my local machine.  I am pointing at the DLLs from this install as references in my project.  I then have the following line of code in my app to include the DLLs:

using CrystalDecisions.Enterprise;

0 Kudos

Hi Dan,

Someone in your company is the SMP administrator so you'll have to ask around and get them to create an account for you to log cases.

Home | SAP Support Portal

I think the problem is you can't simply point to the location of the Assemblies, they must be installed using one of our redist packages on the application server or WEB server.

A call and case to look over your configuration would be helpful...

Don