la solución alternativa al error fue borrar el registro de evaluación y nuevamente cambiar el estado al dar clic en el botón de cambiar estado.
El escenario fue el siguiente:
1. cambiar al estado de evaluación de candidatos sin haber creado el esquema de evaluación (esto genera un mensaje que hay que crearlo y debe sumar 100)
2. crear la evaluación y guardarla (acá es probable que haya guardado la evaluación)
3. cambiar estad a evaluación de candidatos (es probable que acá trate de guardar nuevamente la evaluación)
resultado:
Cannot insert duplicate key row in object 'rys.evc_evaluaciones_candidato' with unique index 'IX_evc_codccs_codfec_codpru'. The duplicate key value is (7, 1, 1). The statement has been terminated.
ERRORSHELPABOUT
System.Data.SqlClient.SqlException
Cannot insert duplicate key row in object 'rys.evc_evaluaciones_candidato' with unique index 'IX_evc_codccs_codfec_codpru'. The duplicate key value is (7, 1, 1). The statement has been terminated.
System.Data.Entity.Core.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Cannot insert duplicate key row in object 'rys.evc_evaluaciones_candidato' with unique index 'IX_evc_codccs_codfec_codpru'. The duplicate key value is (7, 1, 1).
The statement has been terminated.
en System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
en System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
en System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
en System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
en System.Data.SqlClient.SqlDataReader.get_MetaData()
en System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
en System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
en System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource
1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
en System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
en System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
en System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
en StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior) en c:TeamCitybuildAgentwork1de24adb938b932dStackExchange.ProfilingDataProfiledDbCommand.cs:línea 233
en System.Data.Entity.Infrastructure.Interception.InternalDispatcher1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func
3 operation, TInterceptionContext interceptionContext, Action3 executing, Action
3 executed)
en System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
en System.Data.Entity.Core.Mapping.Update.Internal.DynamicUpdateCommand.Execute(Dictionary2 identifierValues, List
1 generatedValues)
en System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()
--- Fin del seguimiento de la pila de la excepción interna ---
en System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()
en System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransactionT
en System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction)
en Aseinfo.VH4.Data.AppDataContext.SaveChanges(SaveOptions options) en c:BuildAgentwork89066541112bb801VH4DataAppDataContext.cs:línea 103
en Aseinfo.Infrastructure.Base.Entity.EntityServiceBase2.SaveChanges() en c:\BuildAgent\work\89066541112bb801\Infrastructure\Base\Entity\EntityServiceBase.cs:línea 568
en Aseinfo.VH4.Reclutamiento.Services.ConcursoSeleccionService.CambiarEstadoConcurso(ConcursoSeleccion entity, EstadoConcursoSeleccion estadoNuevo) en C:\vh4\VH4\Reclutamiento\Services\ConcursosSeleccion\ConcursoSeleccionService.cs:línea 100
en Aseinfo.VH4.Reclutamiento.Controllers.ConcursoSeleccionController.CambiarEstadoConcurso(Int32 codigoConcurso) en C:\vh4\VH4\Reclutamiento\Controllers\ConcursoSeleccionController.cs:línea 615
en lambda_method(Closure , ControllerBase , Object[] )
en System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary
2 parameters)
en System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters)
en System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
en System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult
2.CallEndDelegate(IAsyncResult asyncResult)
en System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<invokeactionmethodfilterasynchronouslyrecursive>b3d()
en System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>cDisplayClass46.<invokeactionmethodfilterasynchronouslyrecursive>b3f()
en System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>cDisplayClass46.<invokeactionmethodfilterasynchronouslyrecursive>b3f()
en System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>cDisplayClass46.<invokeactionmethodfilterasynchronouslyrecursive>b3f()
en System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>cDisplayClass46.<invokeactionmethodfilterasynchronouslyrecursive>b3f()
en System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass33.<begininvokeactionmethodwithfilters>b32(IAsyncResult asyncResult)
en System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass21.<>cDisplayClass2b.<begininvokeaction>b1c()
en System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass21.<begininvokeaction>b1e(IAsyncResult asyncResult)
Logged on miércoles, 30 de marzo de 2016 at 3:46:10 p. m.
See also:
Raw/Source data in XML or in JSON
Server Variables
Name Value
ALL_HTTP HTTP_CACHE_CONTROL:max-age=0 HTTP_CONNECTION:keep-alive HTTP_CONTENT_LENGTH:231 HTTP_CONTENT_TYPE:application/x-www-form-urlencoded HTTP_ACCEPT:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8 HTTP_ACCEPT_ENCODING:gzip, deflate HTTP_ACCEPT_LANGUAGE:en-US,en;q=0.8,es;q=0.6 HTTP_COOKIE:UICultureKey=es-GT; CultureKey=es-GT; ASP.NET_SessionId=s2vomqi034tjlqmea1v0nbea; RequestVerificationToken_L0V2b2x1dGlvbg2=xLayajGa1DhSPfUlx2A1lljXI-damfKP149aGdYpS0iFZh_pI6qv51QfIvYAqobHgih4jpvXM_M7rfauTsJ1yDGXDyqybR9Kn0JQsXRa0gs1; RequestVerificationToken=uMBky0yOrxGu8FtRUhA_JA4vdrAYu1t0fepd9TQLP1oaWxLdlKJTr6U7ewhylqwZseNj7V22SfVadxFtPG1K5VfcGjCsZCPuspnkF4BxPp81; .ASPXFORMSAUTH=54B6C078ED28436C9BE271E067CB358804B5E77CDDADB1D2BB616FE465A36F794C4F746CFD14F8806F606BC425F2598C5E318012450C998D5E5DEBBAE2FAAB9F9C1F720F4FC6B7EA7C2330C3AFC592EADEB0EC849E46C8AB4B004322059BAC75626E07F0F16D6D0EC510A6153A5F20DCE78C0B4A50563BC3DDACC5BD5D4A37A2708B8D968BBDFBEB8440B10161F00A4F; UsernameCookieKey=gilbertoll HTTP_HOST:localhost HTTP_REFERER:http://localhost/Evolution/Reclutamiento/ConcursoSeleccion/EditEsquemaEvaluacion/4 HTTP_USER_AGENT:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36 HTTP_ORIGIN:http://localhost HTTP_UPGRADE_INSECURE_REQUESTS:1
ALL_RAW Cache-Control: max-age=0 Connection: keep-alive Content-Length: 231 Content-Type: application/x-www-form-urlencoded Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8 Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.8,es;q=0.6 Cookie: UICultureKey=es-GT; CultureKey=es-GT; ASP.NET_SessionId=s2vomqi034tjlqmea1v0nbea; RequestVerificationToken_L0V2b2x1dGlvbg2=xLayajGa1DhSPfUlx2A1lljXI-damfKP149aGdYpS0iFZh_pI6qv51QfIvYAqobHgih4jpvXM_M7rfauTsJ1yDGXDyqybR9Kn0JQsXRa0gs1; RequestVerificationToken=uMBky0yOrxGu8FtRUhA_JA4vdrAYu1t0fepd9TQLP1oaWxLdlKJTr6U7ewhylqwZseNj7V22SfVadxFtPG1K5VfcGjCsZCPuspnkF4BxPp81; .ASPXFORMSAUTH=54B6C078ED28436C9BE271E067CB358804B5E77CDDADB1D2BB616FE465A36F794C4F746CFD14F8806F606BC425F2598C5E318012450C998D5E5DEBBAE2FAAB9F9C1F720F4FC6B7EA7C2330C3AFC592EADEB0EC849E46C8AB4B004322059BAC75626E07F0F16D6D0EC510A6153A5F20DCE78C0B4A50563BC3DDACC5BD5D4A37A2708B8D968BBDFBEB8440B10161F00A4F; UsernameCookieKey=gilbertoll Host: localhost Referer: http://localhost/Evolution/Reclutamiento/ConcursoSeleccion/EditEsquemaEvaluacion/4 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36 Origin: http://localhost Upgrade-Insecure-Requests: 1
APPL_MD_PATH /LM/W3SVC/1/ROOT/Evolution
APPL_PHYSICAL_PATH C:inetpubwwwrootEvolution
AUTH_PASSWORD *
AUTH_TYPE Forms
AUTH_USER gilbertoll
CERT_COOKIE
CERT_FLAGS
CERT_ISSUER
CERT_KEYSIZE
CERT_SECRETKEYSIZE
CERT_SERIALNUMBER
CERT_SERVER_ISSUER
CERT_SERVER_SUBJECT
CERT_SUBJECT
CONTENT_LENGTH 231
CONTENT_TYPE application/x-www-form-urlencoded
GATEWAY_INTERFACE CGI/1.1
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.8,es;q=0.6
HTTP_CACHE_CONTROL max-age=0
HTTP_CONNECTION keep-alive
HTTP_CONTENT_LENGTH 231
HTTP_CONTENT_TYPE application/x-www-form-urlencoded
HTTP_COOKIE UICultureKey=es-GT; CultureKey=es-GT; ASP.NET_SessionId=s2vomqi034tjlqmea1v0nbea; RequestVerificationToken_L0V2b2x1dGlvbg2=xLayajGa1DhSPfUlx2A1lljXI-damfKP149aGdYpS0iFZh_pI6qv51QfIvYAqobHgih4jpvXM_M7rfauTsJ1yDGXDyqybR9Kn0JQsXRa0gs1; RequestVerificationToken=uMBky0yOrxGu8FtRUhA_JA4vdrAYu1t0fepd9TQLP1oaWxLdlKJTr6U7ewhylqwZseNj7V22SfVadxFtPG1K5VfcGjCsZCPuspnkF4BxPp81; .ASPXFORMSAUTH=54B6C078ED28436C9BE271E067CB358804B5E77CDDADB1D2BB616FE465A36F794C4F746CFD14F8806F606BC425F2598C5E318012450C998D5E5DEBBAE2FAAB9F9C1F720F4FC6B7EA7C2330C3AFC592EADEB0EC849E46C8AB4B004322059BAC75626E07F0F16D6D0EC510A6153A5F20DCE78C0B4A50563BC3DDACC5BD5D4A37A2708B8D968BBDFBEB8440B10161F00A4F; UsernameCookieKey=gilbertoll
HTTP_HOST localhost
HTTP_ORIGIN http://localhost
HTTP_REFERER http://localhost/Evolution/Reclutamiento/ConcursoSeleccion/EditEsquemaEvaluacion/4
HTTP_UPGRADE_INSECURE_REQUESTS 1
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
HTTPS off
HTTPS_KEYSIZE
HTTPS_SECRETKEYSIZE
HTTPS_SERVER_ISSUER
HTTPS_SERVER_SUBJECT
INSTANCE_ID 1
INSTANCE_META_PATH /LM/W3SVC/1
LOCAL_ADDR ::1
LOGON_USER gilbertoll
PATH_INFO /Evolution/Reclutamiento/ConcursoSeleccion/CambiarEstadoConcurso
PATH_TRANSLATED C:inetpubwwwrootEvolutionReclutamientoConcursoSeleccionCambiarEstadoConcurso
QUERY_STRING
REMOTE_ADDR ::1
REMOTE_HOST ::1
REMOTE_PORT 52407
REMOTE_USER gilbertoll
REQUEST_METHOD POST
SCRIPT_NAME /Evolution/Reclutamiento/ConcursoSeleccion/CambiarEstadoConcurso
SERVER_NAME localhost
SERVER_PORT 80
SERVER_PORT_SECURE 0
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE Microsoft-IIS/8.5
URL /Evolution/Reclutamiento/ConcursoSeleccion/CambiarEstadoConcurso