views:

175

answers:

2

Hi

I have got following error:

"Could not load file or assembly 'Microsoft.Office.Server.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format."

Does anybody know solution for this?

or

Does anybody gonn through this error?

Any input greatly appretiated?

A: 

The An attempt was made to load a program with an incorrect format part of the error message suggests that this has something to do with 32-bit/64-bit architecture.

Is the OS 32-bit or 64-bit?
How is IIS configured?
How was the assembly you're trying to use compiled?

Read these 2 posts:

Marek Grzenkowicz
Hi Marek,Thanks for Given reply Yes the code was wrriten for MOss but when i used this code in web-aplication it has showing this error but when i used in Console application it is woring well so what was the problem ? should i need to add as safe assembly in web.config ?
Hitesh Wadekar
@Hitesh Did you use the same machine to perform both tests (Web application and console application)?
Marek Grzenkowicz
A: 

Hi there.

If you are convinced that the DLL file is on the server, you should try looking for it here:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\

From my experience with SharePoint, some DLL files can be found in the GAC whilst others were located in the above folder.

EDIT: If you're using SharePoint 2010, then change 12 to be 14 in the folder path.

Cheers. Jas.

Jason Evans