Un cliente reportó que el proceso de sincronización de empresas no permite la sincronización de empresas y da un error. El cliente tiene Evolution 1.19 en pruebas y 1.11 en producción, pero en ambos portales da el mismo error: Es un problema de datos, pero me podrían orientas con las siguientes dudas: 1. Que catálogo habría que sincronizar para las empresas. ¿El grupo corporativo? ¿El tipo de empresa? porque esos catálogos no tienen sincronización en el RYS Público 2. ¿Cómo valido cuál es el json que se ejecuta o es un SP? Da dos (2) errores en el elmah: ERROR 1 Unexpected character encountered while parsing value: <. Path '', line 0, position 0. ERRORSHELPABOUT Newtonsoft.Json.JsonReaderException Unexpected character encountered while parsing value: <. Path '', line 0, position 0. System.Exception: No se pudo obtener el país para la IP [::1] con cyScape.CountryHawk ni con freegeoip.net ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. at Newtonsoft.Json.JsonTextReader.ParseValue() at Newtonsoft.Json.JsonTextReader.Read() at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Common.CountryIP.GetCountryByIP(String ipAddress) in C:vh4DevRysPublicoCommonCountryIP.cs:line 14 at Common.BitacoraLogin.GenerarBitacora(HttpRequestBase request) in C:vh4DevRysPublicoCommonBitacoraLogin.cs:line 52 --- End of inner exception stack trace --- Logged on miércoles, 24 de marzo de 2021 at 12:53:19 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:169 HTTP_CONTENT_TYPE:application/x-www-form-urlencoded HTTP_ACCEPT:text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9 HTTP_ACCEPT_ENCODING:gzip, deflate, br HTTP_ACCEPT_LANGUAGE:es-ES,es;q=0.9 HTTP_COOKIE:AspxAutoDetectCookieSupport=1; EvoRysConsola_SessionId=0vh5yx3xejmci5c5ycdmhhct; RequestVerificationToken=oWfxLzbyh27hiwgQSC2VEIPTfowHgaok_9sEoBYy6kQzMmng1i6ylD8rQmM-HnZ1jFONTn9kAo8MWYIsQ_eTYhJjrNN5vLrcBPDrMvm_tOc1; ASP.NET_SessionId=jogb5u3t1zsq3khvh0qdykqp; RequestVerificationToken_L0V2b2x1dGlvbg2=nPnqwsAkr2wGuZ3q-QtcHUAw9Od_TeDN82d5X8fEvoG-Wpn6KGuSEK4QQYVlsUUXBSuqcEk2PLT11NdQBEoPbtYkxI6XJzOkI9wxv4enreo1; .ASPXFORMSAUTH=8CB9C95B97441AF38A635B20B2484736C7BE5E078D493052DFA23528C429E45D22D6D8E8EFB11BF1043D69357211F931E8F97E21DD0632B04693910ACC4CC68A036E8A63A13FCD02158B950EF98C56EFE10F8FC6DCE99CB27C6BA5C9185AAE673528D0E220ACD698E84B942A26B7FE042C3BD30031305FB5EC9DB13E830549DE; UsernameCookieKey=; EvolutionRYSConsola=tifH3931H3StshWVD9SUUsfny8kUet152KgdoP_884X7biAk3DjribqB4KOmdbksgl7a5cI2q-5B-nR8Nppsz9VjHPA5CpwhX3FC5hUlEniwZD-v1vEa2VG3bmiKOjsnNkeK2xCtQBhhg7NFfT0tC2SIXXCmZjkVH43a0sVdgJLlhOL-VEU5C8I45wOzH8xR_h8hJkwPXljbObsWjacBojHwM95w8ZaAxb88X65NB755hNyqGl7D1Ae85pHCLnN5YmIjdgD96YBWDQ3XpT-pYJKnuhcgdjQy7Jug7x_Le9xPjF6_92I_PtUNIlvNdo29W3dgLgrSeMTci7VV0JEKpQG8jUldr-bRm9Ejeh9d_X9_rPbcd0bUYSx0d-9L693Ughx6pN1rHjbVim2mhaQURRchnrPu_WmmZuSsWqgHb9hpbU2EnhBhSRscPsionWSGPGJYMraStqikSLIJf8o30l-C8lhGNympMOmoHCeFLlpUm9vtj6je50Rc5l-xBFuiEbkJdXvNjmi37XcqkX0eWg HTTP_HOST:localhost:8080 HTTP_REFERER:http://localhost:8080/Account/LogOn?ReturnUrl=%2FControlPanel HTTP_USER_AGENT:Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36 HTTP_SEC_CH_UA:"Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99" HTTP_SEC_CH_UA_MOBILE:?0 HTTP_UPGRADE_INSECURE_REQUESTS:1 HTTP_ORIGIN:http://localhost:8080 HTTP_SEC_FETCH_SITE:same-origin HTTP_SEC_FETCH_MODE:navigate HTTP_SEC_FETCH_USER:?1 HTTP_SEC_FETCH_DEST:document
ALL_RAW Cache-Control: max-age=0 Connection: keep-alive Content-Length: 169 Content-Type: application/x-www-form-urlencoded Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9 Accept-Encoding: gzip, deflate, br Accept-Language: es-ES,es;q=0.9 Cookie: AspxAutoDetectCookieSupport=1; EvoRysConsola_SessionId=0vh5yx3xejmci5c5ycdmhhct; RequestVerificationToken=oWfxLzbyh27hiwgQSC2VEIPTfowHgaok_9sEoBYy6kQzMmng1i6ylD8rQmM-HnZ1jFONTn9kAo8MWYIsQ_eTYhJjrNN5vLrcBPDrMvm_tOc1; ASP.NET_SessionId=jogb5u3t1zsq3khvh0qdykqp; RequestVerificationToken_L0V2b2x1dGlvbg2=nPnqwsAkr2wGuZ3q-QtcHUAw9Od_TeDN82d5X8fEvoG-Wpn6KGuSEK4QQYVlsUUXBSuqcEk2PLT11NdQBEoPbtYkxI6XJzOkI9wxv4enreo1; .ASPXFORMSAUTH=8CB9C95B97441AF38A635B20B2484736C7BE5E078D493052DFA23528C429E45D22D6D8E8EFB11BF1043D69357211F931E8F97E21DD0632B04693910ACC4CC68A036E8A63A13FCD02158B950EF98C56EFE10F8FC6DCE99CB27C6BA5C9185AAE673528D0E220ACD698E84B942A26B7FE042C3BD30031305FB5EC9DB13E830549DE; UsernameCookieKey=; EvolutionRYSConsola=tifH3931H3StshWVD9SUUsfny8kUet152KgdoP_884X7biAk3DjribqB4KOmdbksgl7a5cI2q-5B-nR8Nppsz9VjHPA5CpwhX3FC5hUlEniwZD-v1vEa2VG3bmiKOjsnNkeK2xCtQBhhg7NFfT0tC2SIXXCmZjkVH43a0sVdgJLlhOL-VEU5C8I45wOzH8xR_h8hJkwPXljbObsWjacBojHwM95w8ZaAxb88X65NB755hNyqGl7D1Ae85pHCLnN5YmIjdgD96YBWDQ3XpT-pYJKnuhcgdjQy7Jug7x_Le9xPjF6_92I_PtUNIlvNdo29W3dgLgrSeMTci7VV0JEKpQG8jUldr-bRm9Ejeh9d_X9_rPbcd0bUYSx0d-9L693Ughx6pN1rHjbVim2mhaQURRchnrPu_WmmZuSsWqgHb9hpbU2EnhBhSRscPsionWSGPGJYMraStqikSLIJf8o30l-C8lhGNympMOmoHCeFLlpUm9vtj6je50Rc5l-xBFuiEbkJdXvNjmi37XcqkX0eWg Host: localhost:8080 Referer: http://localhost:8080/Account/LogOn?ReturnUrl=%2FControlPanel User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36 sec-ch-ua: "Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99" sec-ch-ua-mobile: ?0 Upgrade-Insecure-Requests: 1 Origin: http://localhost:8080 Sec-Fetch-Site: same-origin Sec-Fetch-Mode: navigate Sec-Fetch-User: ?1 Sec-Fetch-Dest: document
APPL_MD_PATH /LM/W3SVC/3/ROOT
APPL_PHYSICAL_PATH C:inetpubEvoRysConsola
AUTH_PASSWORD *
AUTH_TYPE ERROR 2 Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type For no matching constructor, add a no-arg ctor, add optional arguments, or map all of the constructor parameters ====================================================================================================================================== Empresa -> Empresa_0D3C60CCD06CE5EFD5917D6E90236A81A277A08F30BC04BEC25C18F3196968C9 (Destination member list) Database.Models.Empresa -> System.Data.Entity.DynamicProxies.Empresa_0D3C60CCD06CE5EFD5917D6E90236A81A277A08F30BC04BEC25C18F3196968C9 (Destination member list) Unmapped properties: _entityWrapper ERRORSHELPABOUT AutoMapper.AutoMapperConfigurationException Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type For no matching constructor, add a no-arg ctor, add optional arguments, or map all of the constructor parameters ====================================================================================================================================== Empresa -> Empresa_0D3C60CCD06CE5EFD5917D6E90236A81A277A08F30BC04BEC25C18F3196968C9 (Destination member list) Database.Models.Empresa -> System.Data.Entity.DynamicProxies.Empresa_0D3C60CCD06CE5EFD5917D6E90236A81A277A08F30BC04BEC25C18F3196968C9 (Destination member list) Unmapped properties: _entityWrapper AutoMapper.AutoMapperConfigurationException: Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type For no matching constructor, add a no-arg ctor, add optional arguments, or map all of the constructor parameters ====================================================================================================================================== Empresa -> Empresa_0D3C60CCD06CE5EFD5917D6E90236A81A277A08F30BC04BEC25C18F3196968C9 (Destination member list) Database.Models.Empresa -> System.Data.Entity.DynamicProxies.Empresa_0D3C60CCD06CE5EFD5917D6E90236A81A277A08F30BC04BEC25C18F3196968C9 (Destination member list) Unmapped properties: _entityWrapper at AutoMapper.ConfigurationValidator.AssertConfigurationIsValid(IEnumerable Logged on miércoles, 24 de marzo de 2021 at 12:54:01 p.m. See also: Raw/Source data in XML or in JSON Server Variables Name Value
ALL_HTTP HTTP_CONNECTION:keep-alive HTTP_CONTENT_LENGTH:14 HTTP_CONTENT_TYPE:application/x-www-form-urlencoded; charset=UTF-8 HTTP_ACCEPT:/ HTTP_ACCEPT_ENCODING:gzip, deflate, br HTTP_ACCEPT_LANGUAGE:es-ES,es;q=0.9 HTTP_COOKIE:AspxAutoDetectCookieSupport=1; EvoRysConsola_SessionId=0vh5yx3xejmci5c5ycdmhhct; RequestVerificationToken=oWfxLzbyh27hiwgQSC2VEIPTfowHgaok_9sEoBYy6kQzMmng1i6ylD8rQmM-HnZ1jFONTn9kAo8MWYIsQ_eTYhJjrNN5vLrcBPDrMvm_tOc1; ASP.NET_SessionId=jogb5u3t1zsq3khvh0qdykqp; RequestVerificationToken_L0V2b2x1dGlvbg2=nPnqwsAkr2wGuZ3q-QtcHUAw9Od_TeDN82d5X8fEvoG-Wpn6KGuSEK4QQYVlsUUXBSuqcEk2PLT11NdQBEoPbtYkxI6XJzOkI9wxv4enreo1; .ASPXFORMSAUTH=8CB9C95B97441AF38A635B20B2484736C7BE5E078D493052DFA23528C429E45D22D6D8E8EFB11BF1043D69357211F931E8F97E21DD0632B04693910ACC4CC68A036E8A63A13FCD02158B950EF98C56EFE10F8FC6DCE99CB27C6BA5C9185AAE673528D0E220ACD698E84B942A26B7FE042C3BD30031305FB5EC9DB13E830549DE; UsernameCookieKey=; EvolutionRYSConsola=XtAD3p7wTRuDyfCx4kl8-urrWrKx72Rpk1yZ-RJsxHlxcjAvWb2v-kt8bbg1eyOqWoTPNaQhSD1iySAYB05exwefSdHtda9swX3jklPgjtpQpNefG6Z8SaWkS7aakGqFJtmuJ6MZ-qNohiML_HhDkeHh5hlB_luxau_Oq56BdHemgAemkJCNaJU3dOjUjVMrU5HQT212x6igN7JKDL8i-U98OkBD0jL9gDVq1Qo-ZEK33WgKJFnoZxXJBgk6H2CLT8ib1qREpNBTYi4W75FLxGad4ah0c1FwBcxTjRB7ZTNRX1jnF35lqs5wtaxK8nyF5Se6uE3j0VPsYTAMFDqiqSVaDL2bW3as-ZRH4wC4-jOSRVil2-qI-kFQptusZI6luYllzzuMbxlf9Q89-4hVRxBGsOiQNsZ7-qy1HsAdTnAf7NivXi2OTy5HmHFGbAqxJiMIhGzag2iB7HrduNMM--E2R4BEEEGRHmSlCBBb4YfL42FGc-Vqs8oCe6Qxf5K4CQirdt2ve4J2pSuGl3cQ HTTP_HOST:localhost:8080 HTTP_REFERER:http://localhost:8080/ControlPanel HTTP_USER_AGENT:Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36 HTTP_SEC_CH_UA:"Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99" HTTP_X_REQUESTED_WITH:XMLHttpRequest HTTP_SEC_CH_UA_MOBILE:?0 HTTP_ORIGIN:http://localhost:8080 HTTP_SEC_FETCH_SITE:same-origin HTTP_SEC_FETCH_MODE:cors HTTP_SEC_FETCH_DEST:empty
ALL_RAW Connection: keep-alive Content-Length: 14 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Accept: / Accept-Encoding: gzip, deflate, br Accept-Language: es-ES,es;q=0.9 Cookie: AspxAutoDetectCookieSupport=1; EvoRysConsola_SessionId=0vh5yx3xejmci5c5ycdmhhct; RequestVerificationToken=oWfxLzbyh27hiwgQSC2VEIPTfowHgaok_9sEoBYy6kQzMmng1i6ylD8rQmM-HnZ1jFONTn9kAo8MWYIsQ_eTYhJjrNN5vLrcBPDrMvm_tOc1; ASP.NET_SessionId=jogb5u3t1zsq3khvh0qdykqp; RequestVerificationToken_L0V2b2x1dGlvbg2=nPnqwsAkr2wGuZ3q-QtcHUAw9Od_TeDN82d5X8fEvoG-Wpn6KGuSEK4QQYVlsUUXBSuqcEk2PLT11NdQBEoPbtYkxI6XJzOkI9wxv4enreo1; .ASPXFORMSAUTH=8CB9C95B97441AF38A635B20B2484736C7BE5E078D493052DFA23528C429E45D22D6D8E8EFB11BF1043D69357211F931E8F97E21DD0632B04693910ACC4CC68A036E8A63A13FCD02158B950EF98C56EFE10F8FC6DCE99CB27C6BA5C9185AAE673528D0E220ACD698E84B942A26B7FE042C3BD30031305FB5EC9DB13E830549DE; UsernameCookieKey=; EvolutionRYSConsola=XtAD3p7wTRuDyfCx4kl8-urrWrKx72Rpk1yZ-RJsxHlxcjAvWb2v-kt8bbg1eyOqWoTPNaQhSD1iySAYB05exwefSdHtda9swX3jklPgjtpQpNefG6Z8SaWkS7aakGqFJtmuJ6MZ-qNohiML_HhDkeHh5hlB_luxau_Oq56BdHemgAemkJCNaJU3dOjUjVMrU5HQT212x6igN7JKDL8i-U98OkBD0jL9gDVq1Qo-ZEK33WgKJFnoZxXJBgk6H2CLT8ib1qREpNBTYi4W75FLxGad4ah0c1FwBcxTjRB7ZTNRX1jnF35lqs5wtaxK8nyF5Se6uE3j0VPsYTAMFDqiqSVaDL2bW3as-ZRH4wC4-jOSRVil2-qI-kFQptusZI6luYllzzuMbxlf9Q89-4hVRxBGsOiQNsZ7-qy1HsAdTnAf7NivXi2OTy5HmHFGbAqxJiMIhGzag2iB7HrduNMM--E2R4BEEEGRHmSlCBBb4YfL42FGc-Vqs8oCe6Qxf5K4CQirdt2ve4J2pSuGl3cQ Host: localhost:8080 Referer: http://localhost:8080/ControlPanel User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36 sec-ch-ua: "Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99" X-Requested-With: XMLHttpRequest sec-ch-ua-mobile: ?0 Origin: http://localhost:8080 Sec-Fetch-Site: same-origin Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty
APPL_MD_PATH /LM/W3SVC/3/ROOT
APPL_PHYSICAL_PATH C:inetpubEvoRysConsola
AUTH_PASSWORD *
AUTH_TYPE ApplicationCookie
AUTH_USER admin
CERT_COOKIE
CERT_FLAGS Seguí la sugerencia de sincronizar manualmente y anteriormente habían 22 empresas iguales, 1 diferencia (1 registro sólo existen en evolution). Luego de la sincronización sincronización manual quedaron 23 empresas iguales 1 diferencia (0 sólo existe en evolution, 0 sólo existen en este sitio) y aparece el botón de sincronización y si le dan al botón vuelve a mostrar el mismo error. ¿Hay algún lugar adicional donde se tenga que actualizar, para que ya no marque diferencia? Antes de sincronizar manualmente: Después de sincronizar manualmente: asked 24 Mar '21, 10:26 Juan Carlos Soria |
La sincronización se hace con una instrucción SQL que está guardada en un archivo JSON en el folder App_Data de la instalación de la consola, llamado Allí estan todos los selects utilizados por la sincronización, para el caso de las empresas es el siguiente:
El parámetro answered 24 Mar '21, 12:26 Fernando Paz ♦♦ Si hay una excepción, siempre podes consultar el ELMAH, que aparece al final de las opciones del Panel de Control de la consola.
(24 Mar '21, 12:32)
Fernando Paz ♦♦
¿Me podrías orientar con la excepción que está tirando el ELMAH?
(24 Mar '21, 17:29)
Juan Carlos Soria
|
El primer error lo podes ignorar, porque es un mecanismo de obtención del país de donde proviene la IP del usuario autenticado. Se loggea la excepción pero el proceso continua sin detenerse. El segundo error ya lo copie del texto que pusiste y lo vamos a revisar, y tratar de reproducirlo en un ambiente de desarrollo. Para mientras podes sincronizar manualmente las empresas insertando los registros en la tabla del RYSPublico a partir de los datos de la empresa en Evolution.
answered 24 Mar '21, 18:15 Fernando Paz ♦♦ Muchas gracias. Ya sincronice utilizando el siguiente query: insert rpu.Empresas ([Id],[Nombre],[Activa],[ExisteEnEvolution]) SELECT cia_codigo as Id, cia_descripcion as Nombre, 1 Activa, 1 as ExisteEnEvolution FROM EvoData.eor.cia_companias where cia_Codigo not in (select id from rpu.empresas) Pero me sigue mostrando una diferencia aunque ya todas las empresas están en el sitio del RPU. ¿Porqué muestra diferencia?
(25 Mar '21, 19:02)
Juan Carlos Soria
|