Foros del Web » Programación para mayores de 30 ;) » .NET »

porque aveces sale este error?

Estas en el tema de porque aveces sale este error? en el foro de .NET en Foros del Web. avceces me sale este error Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was ...
  #1 (permalink)  
Antiguo 21/08/2003, 08:54
Avatar de Fher  
Fecha de Ingreso: febrero-2003
Ubicación: En algun lugar de cancun
Mensajes: 384
Antigüedad: 21 años, 3 meses
Puntos: 0
porque aveces sale este error?

avceces me sale este error

Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
  #2 (permalink)  
Antiguo 21/08/2003, 09:43
Avatar de RootK
Moderador
 
Fecha de Ingreso: febrero-2002
Ubicación: México D.F
Mensajes: 8.004
Antigüedad: 22 años, 2 meses
Puntos: 50
Hola... podrías poner el codigo del aspx que estas intentando cargar..??? me imagino que estas creando controles ´dinámicamente pero no estas conservando su estado.

O en que casos se te presenta este erro ..?

Saludos
__________________
Nadie roba nada ya que en la vida todo se paga . . .

Exentrit - Soluciones SharePoint & Net
  #3 (permalink)  
Antiguo 01/09/2003, 08:07
 
Fecha de Ingreso: junio-2001
Ubicación: Cordoba, Argentina
Mensajes: 190
Antigüedad: 22 años, 11 meses
Puntos: 0
Mira ese error puede salir a veces cuando cambias una pagina y no la recompilas, por ejemplo al agregar algun control nuevo.
Por cuestion de seguridad el .net checkea el viewstate (para que los usuarios no lo cambien con un editor de html)y te hackeen el site, entonces cuando cambias algo en la pagina y no la recompilas la pagina compilada es distinta a la nueva pagina.
Saludos
__________________
Martin
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 23:28.