Domanda

In asp.net application , I wrote c# code to add item in sharepoint list and I got error

Microsoft SharePoint is not supported in 32-bit process

I set the platform to 64x with no avail !!!

È stato utile?

Soluzione

In project Properties, try to change IIS Express to Local IIS as the following:

  • Open Visual Studio as administrator.
  • Right click on your project > properties.
  • Don't change the platform and platform target, just set it as default any CPU
  • At web section > below servers > select Local IIS > Click on create virtual directory.
  • Save and run the application that should be working.

Altri suggerimenti

The server must be in 64b where you run your application, not only the configuration of platforme in VisualStudio settings.

Is your application asp.net run on the SharePoint serveur (front-end, applicative ...)?
If yes, you can use the SharePoint API Server site (in the microsoft.SharePoint.dll).
Else you should (and I recommend this) to use the CSOM (Client SharePoint Object Model).

You can find a lot of doc on internet. Like :
How to: Create, Update, and Delete List Items
SharePoint Client Object Modal (CSOM)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top