tags:

views:

130

answers:

1

I have an C# web app that use a 32bit dll . Everytime I try to access the service , I get

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

I've switched the IIS pool to enable 32 bit , reset everything , tried again - but still the same error.

Most of the issues I found have been solved by the "32bit enabled = true" change . Any ideas?

+1  A: 

Try to access it via the console application with no development tools installed (aka, a live environment or a development server which do not have VS2008 installed) and try again (RE: the comment posted by Heinzi).

If you still can then check to see if your web app is running under the correct .NET framework version (and that it's installed on the server).

Since this appears not to be an ISAPI DLL requiring 32-bit application to be switched on, but a C# Web App. My money is there is something wrong with the web app deployment on the server and not the DLL itself.

Also remember, if the DLL is not .NET, you need to register it on the server using regsrv32 before you can access it with your web app anyway.

Hope I helped.

edit

If all other attempts fail, try to re-compile the DLL you're using setting the target to X86 on the compiler and re-reference it in your web app.

AcidRaZor
Cool, thanks! I'll try it out
yossale
Also make sure that if you're running different .NET web apps on the server, to create a application pool for that specific site (something which IIS7 does automatically, but just as a note anyway)
AcidRaZor