Recentemente in uno SharePoint 2013 on premise mi è capitato questo errore nei log di windows:
Log Name: Application
Source: Microsoft-SharePoint Products-SharePoint Foundation
Date: 17/05/2017 14:17:09
Event ID: 6875
Task Category: General
Level: Error
Keywords:
User: SGARTIT\sp01
Computer: SGART01.sgart.local
Description:
Error loading and running event receiver Security.RP.NegoziEventReceiver in Security.RP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cf297214290e323b. Additional information is below.

Impossibile trovare un server disponibile per l'esecuzione di codice in modalità sandbox.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/200...events/event ">
<System>
<Provider Name="Microsoft-SharePoint Products-SharePoint Foundation" Guid="{6FB7F0CD-53E7-47DD-997A-241573931FC2}" />
<EventID>6875</EventID>
<Version>14</Version>
<Level>2</Level>
<Task>7</Task>
<Opcode>0</Opcode>
<Keywords>0x4000000000000000</Keywords>
<TimeCreated SystemTime="2017-05-16T12:17:09.608756100Z" />
<EventRecordID>349218</EventRecordID>
<Correlation />
<Execution ProcessID="12320" ThreadID="6768" />
<Channel>Application</Channel>
<Computer>SGART01.sgart.local</Computer>
<Security UserID="S-1-5-21-1180862149-1734307507-329593862-10281" />
</System>
<EventData>
<Data Name="string0">Security.RP.NegoziEventReceiver</Data>
<Data Name="string1">Security.RP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cf297214290e323b</Data>
<Data Name="string2">Impossibile trovare un server disponibile per l'esecuzione di codice in modalità sandbox.</Data>
</EventData>
</Event>
L'errore sembrava dovuto ad una solution di tipo sandbox, ma su questa Farm non ho mai usato le solution di tipo sandbox e il servizio Microsoft SharePoint Foundation Sandboxed Code Service non era mai stato attivato.

Dopo un indagine ho scoperto che il problema era dovuto ad una doppia registrazione di un event handler, rimosso il duplicato tutto ha ripreso a funzionare senza errori.

Per verificare se ci sono event handler doppi, puoi usare questo PowerShell:

PowerShell

$w=get-spweb http://sharepoint.sgart.local/sicurezza
$l=$w.Lists["Negozi"]
$l.EventReceivers
che stamperà a video gli event receivers agganciati alla lista. Questo è un esempio di 1 event receivers:

Text

Id                          : 21a16d14-d4cf-4066-9426-b5a647af58c8
Name                        : NegoziEventReceiver
SiteId                      : 8cbcd65e-940c-49d7-a4e0-043257bc91a2
WebId                       : d4a2f42d-98ec-45a4-9fbd-ed433b4e676d
HostId                      : fb336722-1a77-4d3e-b411-1444ace97efd
HostType                    : List
ParentHostId                : 00000000-0000-0000-0000-000000000000
ParentHostType              : Site
Synchronization             : Asynchronous
Type                        : ItemUpdated
SequenceNumber              : 10101
Assembly                    : Security.RP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bf297814290f332b
Class                       : Security.RP.NegoziEventReceiver
Data                        :
Filter                      :
Credential                  : 0
ContextItemId               : 0
ContextItemUrl              :
ContextType                 : 00000000-0000-0000-0000-000000000000
ContextEventType            : 00000000-0000-0000-0000-000000000000
ContextId                   : 00000000-0000-0000-0000-000000000000
ContextObjectId             : 00000000-0000-0000-0000-000000000000
ContextCollectionId         : 00000000-0000-0000-0000-000000000000
UpgradedPersistedProperties :
per cancellarlo si può andare tramite indice. Prima verifica se l'indice si riferisce all'elemento giusto

PowerShell

$l.EventReceivers[3]
se si lo cancello

PowerShell

$l.EventReceivers[3].delete()
$l.Update()
Tags:
Errori120 PowerShell199 SharePoint497 SharePoint 2010224
Potrebbe interessarti anche: