jueves, 26 de marzo de 2009

First-chance exception at 0x77e4bee7 in w3wp.exe: 0xC0000005

Sharepoint Error en workflow (solucionada):

Hola, vamos a estrenar este Blog con una entrada interesante relacionada con los flujos de trabajo en Sharepoint y que me costo algunas horas resolver.

Se trata del error:

First-chance exception at 0x77e4bee7 in w3wp.exe: 0xC0000005: Access violation reading location 0x00000000.

(Línea obtenida de Output Windows teniendo adjuntado el proceso w3wp.exe)

Parece ser y por experiencia que cuando se crea desde otro lugar una instancia de ejecución que altera un elemento de una Lista de un sitio diferente al sitio donde se encuentra esta se crea un conflicto de acceso, en este caso específicamente es debido a que no estaba dando de alta todos los cambios en mi Worfkflow, debido a que en una modificación solicitada por el cliente no se especifico que debería de ser obligada y cree la instancia de ejecución sobre el mismo sitio.

Entonces no considere que fuese requerida para que al momento de arrancar el Workflow fuese necesario pasarle todos y cada uno de los datos que espera para generar correctamente el registro, pues lo probé dando de alta desde la vista de alta predefinida por SharePoint y funciono!!!! Entonces comencé a analizar mejor el trace del error.

En un trace mayor del error obtenemos esto:

An unhandled exception of type 'System.InvalidCastException' occurred in System.Web.dll
Additional information: Unable to cast object of type 'System.Collections.DictionaryEntry' to type 'System.Web.PartitionInfo'.
System.Transactions Critical: 0 : The thread 'Win32 Thread' (0x500) has exited with code 0 (0x0).
'w3wp.exe': Unloaded 'C:\WINDOWS\system32\inetsrv\w3isapi.dll'
The thread 0x1a78 has exited with code 0 (0x0).
The thread 0x1ba8 has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1a78) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1ba8) has exited with code 0 (0x0).
http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/UnhandledUnhandled exception/LM/W3SVC/900006728/Root-1-128824112229557717System.InvalidCastException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Unable to cast object of type 'System.Collections.DictionaryEntry' to type 'System.Web.PartitionInfo'. at System.Web.PartitionManager.Dispose()
at System.Web.SessionState.SqlSessionStateStore.OnAppDomainUnload(Object unusedObject, EventArgs unusedEventArgs)
System.InvalidCastException: Unable to cast object of type 'System.Collections.DictionaryEntry' to type 'System.Web.PartitionInfo'.
at System.Web.PartitionManager.Dispose()
at System.Web.SessionState.SqlSessionStateStore.OnAppDomainUnload(Object unusedObject, EventArgs unusedEventArgs)

'w3wp.exe': Unloaded 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll'
The thread 'Win32 Thread' (0xa70) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xccc) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x734) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x16a4) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1ffc) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1b0c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x26c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1df0) has exited with code 0 (0x0).
The thread 0x1df0 has exited with code 0 (0x0).
'w3wp.exe': Unloaded 'C:\WINDOWS\system32\inetsrv\iisres.dll'
'w3wp.exe': Unloaded 'C:\WINDOWS\system32\inetsrv\w3core.dll'
'w3wp.exe': Unloaded 'C:\WINDOWS\system32\iismap.dll'
'w3wp.exe': Unloaded 'C:\WINDOWS\system32\inetsrv\wamreg.dll'
'w3wp.exe': Unloaded 'C:\WINDOWS\system32\inetsrv\lonsint.dll'
'w3wp.exe': Unloaded 'C:\WINDOWS\system32\inetsrv\w3comlog.dll'
'w3wp.exe': Unloaded 'C:\WINDOWS\system32\strmfilt.dll'
'w3wp.exe': Unloaded 'C:\WINDOWS\system32\inetsrv\w3dt.dll'
'w3wp.exe': Unloaded 'C:\WINDOWS\system32\httpapi.dll'
'w3wp.exe': Unloaded 'C:\WINDOWS\system32\inetsrv\w3cache.dll'
'w3wp.exe': Unloaded 'C:\WINDOWS\system32\inetsrv\w3tp.dll'
The thread 'Win32 Thread' (0x1f04) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x840) has exited with code 1 (0x1).




The thread 'Win32 Thread' (0x1aa4) has exited with code 1 (0x1).
The program '[7120] w3wp.exe: Native' has exited with code 1 (0x1).
The program '[7120] w3wp.exe: Managed' has exited with code 1 (0x1).

Entonces habría que revisar que todos los campos de el workflow estén cargándose correctamente a través:




thisstyle='font-size:10.0pt;line-height:115%;font-family:"Courier New";mso-no-proof:
yes'>.<CreateTask_Method_Name>.ExtendedProperties["LisItem"] = <Cosntante>;style='mso-bidi-font-weight:normal'>



Y cree la instancia de ejecución de modificación dentro del mismo sitio donde se encuentra la Lista.

Espero les sea de utilidad.

Feliz Código