Click here to Skip to main content
15,846,211 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Together,

I am developing an application which need to connect SAP system using ASP.Net.
I found SAP .Net connector to connect ASP.Net application and SAP systems.
Unfortunately i am not able to connect because of below error.

"Could not load file or assembly 'sapnco_utils, Version=, Culture=neutral, PublicKeyToken=50436dca5c7f7d23' or one of its dependencies. The system cannot find the file specified."

Do some one help me to resolve this error?

RaJiTh R s

What I have tried:

I created a simple ASP.Net website. Right clicked on the Website and clicked on 'ADD Reference'. Then added the two dll's SAPNCO.dll and SAPNCO_UTILS.dll.
After that I am not able to build the website because of above error.

I also have changed the .Net version to 3.5 and 4.0, After that also didn't works.

I also have cross verified whether i have the two dll for x64 version. Which is also x64 version only.

But it works for me when i create WPF application. It doesnt work when i create web application.
Updated 12-Oct-17 11:03am
ZurdoDev 12-Oct-17 8:34am    
The dll should be in your bin folder. For some reason, and you'll have to figure out why, it cannot find the right dll.
Member 13461057 12-Oct-17 8:58am    
Thanks for your fast reply.. I dont have bin folder in my web application. I created a new folder inside my application and pasted the dll files. But it doesnt work. could you please tell me how can i integrate sap .net connector in web application?
ZurdoDev 12-Oct-17 9:01am    
You do have a bin folder but it does not show in your solution. Go to the hard drive in the root of your app and there should be one there.
Member 13461057 13-Oct-17 9:27am    
Now i get the below error
Could not load file or assembly 'sapnco' or one of its dependencies. An attempt was made to load a program with an incorrect format

Stack trace file is like below
[BadImageFormatException: Could not load file or assembly 'sapnco' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
Richard Deeming 13-Oct-17 9:58am    
That error usually indicates that you're trying to load a 32-bit assembly in a 64-bit application, or vice-versa.

1 solution

Share this answer
Member 13461057 13-Oct-17 9:29am    
It looks pretty old.. In visual studio 2015 i dont find 'Web Project Items → SAP Connector Class'

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900