Al momento de crear una nueva noticia (que inicialmente tenía 2500 caracteres pero tuve que reducirlo a 1800 porque salía un mensaje que no puede ser mayor de 4000) aparentemente se crea bien pero el elmah registra este error

System.Web.HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerWrapper'. ---> System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at ASP.areas_administracion_views_noticia_listadousuarios_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer)

Luego cuando le agrego un rol para poder ver la noticia, aparece en el la pagina de inicio, pero al darle click a la noticia me muestra este mensaje

System.ArgumentException: The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult GetNoticia(Int32)' in 'Aseinfo.VH4.UI.Web.Controllers.HomeController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.Parameter name: parameters at System.Web.Mvc.ActionDescriptor.ExtractParameterFromDictionary(ParameterInfo parameterInfo, IDictionary`2 parameters, MethodInfo methodInfo)

asked 25 Jun '13, 18:26

sbarahona's gravatar image

sbarahona ♦♦
(suspended)
accept rate: 32%

¿Podrías interceptar los request que salen de browser y ver que ID le debería de enviar al server cuando le das click a la noticia?

Luego busca en la base de datos si existe en la tabla de noticias...

Seguramente lo que va a pasar es que no envía el Id. Pero si probas y nos confirmas que no envía el Id, podemos ingresarlo como bug.

(26 Jun '13, 01:21) Fernando Paz ♦♦ Fernando%20Paz's gravatar image

Sobre los 4000 caracteres, el problema es que cómo es texto HTML, a las puras letras se deben agregar los "tags" de HTML, para determinar el largo.

(26 Jun '13, 01:22) Fernando Paz ♦♦ Fernando%20Paz's gravatar image
1
(02 Jul '13, 11:38) sbarahona ♦♦ sbarahona's gravatar image

Para el contenido yo hice lo que el usuario me imagino que haría: copiar y pegar de una pagina web, pero detras de unas pocas palabras hay un monton de tags de estilo. Si en el componente de edicion se le pudiera habilitar ver el fuente sería bueno para al menos enseñarle al usuario lo que hay por debajo

(02 Jul '13, 11:41) sbarahona ♦♦ sbarahona's gravatar image

Apliqué un "hot fix" para que funcione la noticia:

View:

Evolution\views\home\index.aspx

ANTES

/****** NOTICIAS ******/
        function VerNoticia(id) {
            $.get('<%= Url.Action("GetNoticia") %>/', { id: id }, function (response) {**
                $('#jDialogMasterPage').html(response).dialog({ title: '<%: this.GetLocalized("TituloVisorNoticias") %>' }).dialog('open');
            });
        }

DESPUES

/****** NOTICIAS ******/
        function VerNoticia(id) {
            $.get('<%= Url.Action("GetNoticia") %>/'+id, id , function (response) {
                $('#jDialogMasterPage').html(response).dialog({ title: '<%: this.GetLocalized("TituloVisorNoticias") %>' }).dialog('open');
            });
        }
link

answered 02 Jul '13, 11:47

sbarahona's gravatar image

sbarahona ♦♦
(suspended)
accept rate: 32%

edited 02 Jul '13, 11:49

Esta es la respuesta correcta Salvador. Me alegra que fuiste proactivo y lo pudiste arreglar. Hacenos el favor de reportarlo como Issue en el Bitbucket para que este arreglo quede en el fuente standard!

(03 Jul '13, 19:15) sabanito ♦♦ sabanito'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

Asked: 25 Jun '13, 18:26

Seen: 2,650 times

Last updated: 03 Jul '13, 19:15

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