cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

Hi all experts,

I want to create add on web application for my customer. and in that web application, i want to create web service to create web method to insert and update information in SAP. i created web service by using vs 2010 with .net framework 3.5. after i created, i public into my local iis7 and start to run web service. When i browse web service, it displays me an error like this: "Could not load file or assembly 'Interop.SAPbobsCOM' or one of its dependencies. An attempt was made to load a program with an incorrect format" . I don't know how to solve it.

So does anybody know how i can solve this problem?

Note: it runs in Win 7 64 bit.

Thanks

TONY

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I just recently ran into this and have a solution!  I know this thread is over a year old, but incase anyone else stumbles across this post, I thought I'd post my solution.

The issue I encountered, was my Visual Studio project was set to build for x86, but my IIS Express ran by Visual Studio was set to run in x64.  To turn off x64 for IIS Express in Visual Studio navigate to:

Tools -> Options -> Projects and Solutions -> Web Projects

and then uncheck "Use the 64 bit version of IIS Express".

As soon as I did this, rebuilt and ran my solution, everything started working again!

Former Member
0 Kudos

Thanks for sharing! your post pointed my to the right direction. I have similar error after publishing the web app to IIS server. I set the "Enable 32-bit applications" of the defaultAppPool to true. error is gone.

Former Member
0 Kudos

This solved my issue running on a full IIS on my local Win 10 development box.

Thank you!