[Mono-aspnet-list] System.InvalidCastException on LoadViewState
Marek Habersack
grendel at twistedcode.net
Fri Oct 9 15:45:27 EDT 2009
Marek Habersack wrote:
> Stifu wrote:
>> It sounds a lot like a regression in Mono. Maybe you could file a bug report
>> with a reduced test case, to bring it to the attention of the developers?
> I am working on this issue now. Fix should land in svn tonight. I'll follow up when that happens.
No commit has happened as it turned out not to be a bug in Mono. APS, can you check that you
recreate the controls on post-back in the same order and number as during normal request? Code which
is not symmetrical in that regard might work on .NET (by sheer accident, as .NET uses the same types
to serialize most control's view state whereas Mono doesn't do that), even though particular
viewstate item might be sent for restore to a control which hasn't created the state.
marek
>
> marek
>>
>> aps-3 wrote:
>>> Probably I have some custom object inside viewstate, maybe this could
>>> be the problem, but why it works on MS and Mono 2.0.1? What I can check?
>>>
>>> At 11.46 05/10/2009, APS wrote:
>>>> Hi,
>>>>
>>>> yesterday I moved my web application from Mono 2.0.1 to Mono 2.4.
>>>> Now in some page, during postback I obtain the following error. I
>>>> will check what there is in viewstate but I can't understand why it
>>>> works on 2.0.1 and not on 2.4
>>>> Some change in Mono can cause this problem? It works on MS. Thanks in
>> advance.
>>>>
>>>> System.Web.HttpUnhandledException: Exception of type
>>>> 'System.Web.HttpUnhandledException' was thrown. --->
>>>> System.InvalidCastException: Cannot cast from source type to
>>>> destination
>>>> type.
>>>> at System.Web.UI.StateBag.LoadViewState (System.Object
>>>> savedState)
>>>> [0x00000]
>>>> at System.Web.UI.Control.LoadViewState (System.Object savedState)
>>>> [0x00000]
>>>> at System.Web.UI.Control.LoadViewStateRecursive (System.Object
>>>> savedState) [0x00000]
>>>> at System.Web.UI.Control.LoadViewStateRecursive (System.Object
>>>> savedState) [0x00000]
>>>> at System.Web.UI.Control.LoadViewStateRecursive (System.Object
>>>> savedState) [0x00000]
>>>> at System.Web.UI.Control.LoadViewStateRecursive (System.Object
>>>> savedState) [0x00000]
>>>> at System.Web.UI.Control.LoadViewStateRecursive (System.Object
>>>> savedState) [0x00000]
>>>> at System.Web.UI.Control.LoadViewStateRecursive (System.Object
>>>> savedState) [0x00000]
>>>> at System.Web.UI.Control.LoadViewStateRecursive (System.Object
>>>> savedState) [0x00000]
>>>> at System.Web.UI.Control.LoadViewStateRecursive (System.Object
>>>> savedState) [0x00000]
>>>> at System.Web.UI.Control.LoadViewStateRecursive (System.Object
>>>> savedState) [0x00000]
>>>> at System.Web.UI.Control.LoadViewStateRecursive (System.Object
>>>> savedState) [0x00000]
>>>> at System.Web.UI.Control.LoadViewStateRecursive (System.Object
>>>> savedState) [0x00000]
>>>> at System.Web.UI.Control.LoadViewStateRecursive (System.Object
>>>> savedState) [0x00000]
>>>> at System.Web.UI.Control.LoadViewStateRecursive (System.Object
>>>> savedState) [0x00000]
>>>> at System.Web.UI.Control.LoadViewStateRecursive (System.Object
>>>> savedState) [0x00000]
>>>> at System.Web.UI.Page.LoadPageViewState () [0x00000]
>>>> at System.Web.UI.Page.RestorePageState () [0x00000]
>>>> at System.Web.UI.Page.InternalProcessRequest () [0x00000]
>>>> at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext
>>>> context) [0x00000]
>>>> --- End of inner exception stack trace ---
>>>> at System.Web.UI.Page.ProcessException (System.Exception e)
>>>> [0x00000]
>>>> at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext
>>>> context) [0x00000]
>>>> at
>>>> System.Web.HttpApplication+<Pipeline>c__Iterator2.MoveNext ()
>>>> [0x00000]
>>>> at System.Web.HttpApplication.Tick () [0x00000]
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Il messaggio e' stato analizzato alla ricerca di virus o
>>>>
>>>> contenuti pericolosi da
>>>> <http://www.mailscanner.info/>MailScanner, ed e'
>>>>
>>>> risultato non infetto.
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>>
>>>> Mono-aspnet-list mailing list
>>>>
>>>> Mono-aspnet-list at lists.ximian.com
>>>>
>>>> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>>>>
>>> _______________________________________________
>>> Mono-aspnet-list mailing list
>>> Mono-aspnet-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>>>
>>>
>
> _______________________________________________
> Mono-aspnet-list mailing list
> Mono-aspnet-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>
More information about the Mono-aspnet-list
mailing list