Tengo una sustitución temporal con un campo adicional. El campo adicional lo puedo guardar y consultar. Cuando autorizo la entidad y consulto de nuevo el campo adicional obtengo el siguiente error:

System.NullReferenceException: Object reference not set to an instance of an object.
 at Aseinfo.Infrastructure.Base.Web.EFServiceModelBinder.CreateModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Type modelType) in C:VH4InfrastructureBaseWebEFServiceModelBinder.cs:line 104
 at System.Web.Mvc.DefaultModelBinder.BindComplexModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
 at Aseinfo.Infrastructure.Base.Web.EFServiceModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) in C:VH4InfrastructureBaseWebEFServiceModelBinder.cs:line 142
 at System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor) 
 at System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor) 
 at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__19(AsyncCallback asyncCallback, Object asyncState)

A continuación la información del request:

Request URL:http://localhost/Evolution/Acciones/SustitucionTemporal/InformacionAdicional
Request Method:POST
Status Code:500 Internal Server Error
Remote Address:[::1]:80
Response Headers
view source
Cache-Control:private, s-maxage=0
Content-Length:1409
Content-Type:text/html; charset=utf-8
Date:Thu, 13 Oct 2016 15:10:00 GMT
Server:Microsoft-IIS/8.5
X-AspNet-Version:4.0.30319
X-AspNetMvc-Version:5.2
X-Powered-By:ASP.NET
Request Headers
view source
Accept:*/*
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8,es;q=0.6
Connection:keep-alive
Content-Length:414
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
Cookie:ASP.NET_SessionId=0ndgy2f3ua2y1hk1rbf2dm0n; __RequestVerificationToken=8N5F9AYSN1uqnFJpa7LXMPHE2_CT_c2tAGZM0WJqbjNtfvTxND_iUt4YJC4SeyDWiX_xp4Xosm8OVGTKFjmrErvNyedQYL4OdV9Kr-1hD3E1; __RequestVerificationToken_L0V2b2x1dGlvbg2=3nNYsuhbSxB1h5gpaFSYuYO6J5pWDW3vZpwpLjV3cLkw6Ck2RSYsIu_AkZXxU4o4cFCDDoPVqoIxXJPHCNd0_n-KmrbNEnCy4YuROyrgy_s1; UICultureKey=es; CultureKey=es-SV; .ASPXFORMSAUTH=53139379BD2905F1B2E5C471D15688A58F7BBE1E6CD3A5EB1153EFB9B51F372AB6FCD31E670BBB3D7DD88145B6E27B0F52D0892FCAA9A7537DEA1EAB940E8A89C8A8C5F3E8DACD08CCAD8E5F3326994C54EF42DB87D49C470A19E043EDE3D7B74057E4FFD250B341472FBE0131825E93354624A8F429B8DE84510501D4A99D7C; UsernameCookieKey=admin
Host:localhost
Origin:http://localhost
Referer:http://localhost/Evolution/Acciones/SustitucionTemporal/Edit/1
User-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
X-Requested-With:XMLHttpRequest
Form Data
view source
view URL encoded
readonly:False
RawPropertyBagData:HvbR6kzl9KRGQR/dX7GSyKatcglFISqgml1JlUrzenh05tkqCU8u5bwMBzRNopVl16+NW8ganOOZ+Stg3kEguZribO7t6Nzg1ivWc3NeoyQQ6twQCgbKvCyO8bmgCtTmmnzDwmzizXv4fIPbF8+OoL40tRkvZeAPF/atNVpuWiC1/8aO38Y5vttHLGArUwGnY4xW3zb/IKMIcS5CUf5mqhATbys3P3gyEkBj6eu7hQaGhbrB2LJPLStYYlPognd19zfpGwcqzi6v9THIz69AlwUCEyfeDnjpdF2BD0uFVo9Pa75RnCmFYvUljN4oqbh6Qjg60tOFmKLqPVgA9iUcsWj2t4WqZ9jpktJxSedWTMo=

asked 12 Oct '16, 17:05

Jimy%20Tobar's gravatar image

Jimy Tobar ♦♦
(suspended)
accept rate: 56%

edited 13 Oct '16, 09:17

¿En que momento exacto da el error?

¿Es cuando das click sobre el link para ver los campos adicionales?

¿El diálogo ya es visible?

¿El diálogo ya tiene los datos inicalizados?

¿Ocurre en otras pantallas con campos adicionales?

(12 Oct '16, 17:14) Fernando Paz ♦♦ Fernando%20Paz's gravatar image
  • cuando das click sobre el link

  • no se muestra el diálogo solo el error

  • si tiene datos el campo property bag, de igual forma da error si no tiene datos.

  • consulte una acción de movimiento autorizado y no dió error.

  • hice una prueba en mi evolution local y tengo el mismo error.

(12 Oct '16, 18:03) Jimy Tobar ♦♦ Jimy%20Tobar's gravatar image

Usando F12, ¿Qué envía en el Request (url, parámetros o querystring, etc?

(12 Oct '16, 19:09) Fernando Paz ♦♦ Fernando%20Paz's gravatar image

lo agregué a la pregunta. Gracias.

(13 Oct '16, 09:16) Jimy Tobar ♦♦ Jimy%20Tobar's gravatar image

Jimy, el problema es que no existe el hidden de la propiedad Codigo. Se creó el issue EVO-2863 para corregir el problema.

Para solucionarlo modifica el archivo AreasAccionesViewsSustitucionTemporalDetails.aspx y agrega el hidden del código (línea 9 en el estándar):

<%= Html.HiddenFor(x => x.Codigo) %>

en lugar de:

<%= Html.Hidden("RawPropertyBagData", Model.RawPropertyBagData.Encrypt()) %>

Luego, cambia ésta sentencia (línea 54 en el estándar):

<% Html.PropertyBag("btInfo", Url.Action("InformacionAdicional"), Url.Action("GuardarInformacionAdicional"), "Codigo", this.GetLocalized("TituloPropertyBag", "PropertyBagField"), Model); %>

Por ésta otra:

<% Html.ReadOnlyPropertyBag("btnProperty", Url.Action("InformacionAdicional"), "Codigo", this.GetLocalized("TituloPropertyBag", "PropertyBagField"), Model); %>

link

answered 13 Oct '16, 09:46

glemus's gravatar image

glemus
(suspended)
accept rate: 51%

edited 13 Oct '16, 10:26

Gracias Fernando y Gustavo.

(13 Oct '16, 10:09) Jimy Tobar ♦♦ Jimy%20Tobar's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Evolution en BitBucket

En este sitio puede acceder al código fuente, centro de descargas y reportar bugs, propuestas y mejoras para Evolution.

Evolution en JIRA

En este sitio puedes sugerir nueva funcionalidad para Evolution, o puedes votar por la funcionalidad ya propuesta por otros usuarios.

Tags:

×3
×3
×2
×2

Asked: 12 Oct '16, 17:05

Seen: 560 times

Last updated: 13 Oct '16, 10:26

[Acerca de] [Preguntas Frecuentes] [Privacidad] [Soporte] [Contacto]
Copyright 2013-2018. Asesores en Informática