0

I am working on a webservice(.asmx) file with web methods written to connect and do crud operations to share point 2010 lists,which is consumed by my c# application. When I try to run my asmx file, it throws the below error. I have included all related dlls and also Microsoft.Office.Search dll with same version. I tried lot of research on this part but couldn't find reasonable solution.

I took all dlls from the machine where sharepoint is installed. I tried this and tried to change platform to X64, tried referring office.server dll, took dlls from C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI\ Any idea would really help.

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

Kurkula
  • 6,386
  • 27
  • 127
  • 202
  • Where is the asmx deployed to? – Francisco Aquino Mar 05 '15 at 21:31
  • I am adding a method to .asmx file and trying to run on my local machine. The file is not deployed yet. – Kurkula Mar 05 '15 at 21:39
  • 1
    If memory serves well, you need to run the Server OM against the SharePoint Web Application, so an ASMX that uses that API needs to be deployed to the 14\ISAPI\MyService.asmx folder and accessed thru http://sharepoint/_vti_bin/MyService.asmx -- should give you a good head start. – Francisco Aquino Mar 05 '15 at 21:46
  • sorry for this ask. what do you mean by " run the Server OM against the SharePoint Web Application"? – Kurkula Mar 05 '15 at 21:58
  • No worries, server OM (Object Model) is when you are using a reference to Microsoft.SharePoint.dll to do things like use the SPSite, SPWeb and SPList objects. – Francisco Aquino Mar 05 '15 at 22:01

0 Answers0