cancel
Showing results for 
Search instead for 
Did you mean: 

Could not load file or assembly 'sapncp.dll' or one of his dependencies

former_member198308
Active Participant
0 Kudos

Hi,

I have a web service made with WCF.NET 4.5. This web service would be used to obtain certain information from a SAP System using SAP.NET Connector 3.0.

The problem is: When I deploy the web service on a IIS 7 on W2K8 Server, i´m getting this error: "Could not load file or assembly 'sapncp.dll' or one of his dependencies". I´ve tried changing the configuration of the IIS but i can´t solve the problem.

Any clue?

Thanks in advance and best regards

Matías

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member197445
Contributor
0 Kudos

You might be using the 32-bit DLLs of SAP NCo.  This is fine, but if your server is 64-bit, you must enable 32-bit operations in the application pool.

To configure IIS to run 32-bit applications you must follow these steps:

  1. Open IIS
  2. Go to current server – > Application Pools
  3. Select the application pool your 32-bit application will run under
  4. Click Advanced setting or Application Pool Default
  5. Set Enable 32-bit Applications to True

Your other option is to use the 64-bit DLLs, but then you must have NO specifically 32-bit DLLs in your project at all.  "Any CPU" is fine, too.

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Matias,

Assuming that you are using the .NET 4.0 binaries of NCo 3.0, you need to make sure to have the correct Visual Studio 2010 runtime libraries installed (64bit, 32bit). This is the most common cause for the error message you've seen.

Best regards,

Markus