ViewState validation problem with dynamic types

Discussion in 'ASP .Net' started by PJ6, Mar 23, 2009.

  1. PJ6

    PJ6 Guest

    I get the below error in my web application when ViewState contains
    serialized objects of a dynamic type.

    I have a dynamic assembly (not saved to a physical file) named
    "ImplementorFactoryAssembly" that serves dynamically-created interface
    implementors, simple classes with properties.

    What bugs me is that deserialization works just fine; TypeHandle is stable
    across postbacks, casting back to objects from ViewState works... this
    exception is thrown after Load be before PreRender. It looks like there is
    some page-level validation that requires all types in ViewState to be backed
    by physical files. Not sure how to fix this.

    Paul

    Server Error in '/' Application
    --------------------------------------------------------------------------------

    The state information is invalid for this page and might be corrupted.

    === Pre-bind state information ===
    LOG: User = <munged>
    LOG: DisplayName = ImplementorFactoryAssembly, Version=0.0.0.0,
    Culture=neutral, PublicKeyToken=null
    (Fully-specified)
    LOG: Appbase = file:///C:/Resources/DEV/projects/<munged>
    LOG: Initial PrivatePath = C:\Resources\DEV\projects\<munged>\bin
    Calling assembly : (Unknown).
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file:
    C:\Resources\DEV\projects\<munged>\web.config
    LOG: Using machine configuration file from
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
    LOG: Policy not being applied to reference at this time (private, custom,
    partial, or location-based assembly bind).
    LOG: Attempting download of new URL
    file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
    Files/root/32f87833/3b482d6c/ImplementorFactoryAssembly.DLL.
    LOG: Attempting download of new URL
    file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
    Files/root/32f87833/3b482d6c/ImplementorFactoryAssembly/ImplementorFactoryAssembly.DLL.
    LOG: Attempting download of new URL
    file:///C:/Resources/DEV/projects/<munged>/bin/ImplementorFactoryAssembly.DLL.
    LOG: Attempting download of new URL
    file:///C:/Resources/DEV/projects/<munged>/bin/ImplementorFactoryAssembly/ImplementorFactoryAssembly.DLL.
    LOG: Attempting download of new URL
    file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
    Files/root/32f87833/3b482d6c/ImplementorFactoryAssembly.EXE.
    LOG: Attempting download of new URL
    file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
    Files/root/32f87833/3b482d6c/ImplementorFactoryAssembly/ImplementorFactoryAssembly.EXE.
    LOG: Attempting download of new URL
    file:///C:/Resources/DEV/projects/<munged>/bin/ImplementorFactoryAssembly.EXE.
    ....
     
    PJ6, Mar 23, 2009
    #1
    1. Advertising

  2. PJ6

    PJ6 Guest

    Actually never mind, I backed up to make sure serialization was working as
    expected and it wasn't. This isn't an ASP.NET issue.

    Paul

    "PJ6" wrote:

    > I get the below error in my web application when ViewState contains
    > serialized objects of a dynamic type.
    >
    > I have a dynamic assembly (not saved to a physical file) named
    > "ImplementorFactoryAssembly" that serves dynamically-created interface
    > implementors, simple classes with properties.
    >
    > What bugs me is that deserialization works just fine; TypeHandle is stable
    > across postbacks, casting back to objects from ViewState works... this
    > exception is thrown after Load be before PreRender. It looks like there is
    > some page-level validation that requires all types in ViewState to be backed
    > by physical files. Not sure how to fix this.
    >
    > Paul
    >
    > Server Error in '/' Application.
    > --------------------------------------------------------------------------------
    >
    > The state information is invalid for this page and might be corrupted.
    >
    > === Pre-bind state information ===
    > LOG: User = <munged>
    > LOG: DisplayName = ImplementorFactoryAssembly, Version=0.0.0.0,
    > Culture=neutral, PublicKeyToken=null
    > (Fully-specified)
    > LOG: Appbase = file:///C:/Resources/DEV/projects/<munged>
    > LOG: Initial PrivatePath = C:\Resources\DEV\projects\<munged>\bin
    > Calling assembly : (Unknown).
    > ===
    > LOG: This bind starts in default load context.
    > LOG: Using application configuration file:
    > C:\Resources\DEV\projects\<munged>\web.config
    > LOG: Using machine configuration file from
    > c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
    > LOG: Policy not being applied to reference at this time (private, custom,
    > partial, or location-based assembly bind).
    > LOG: Attempting download of new URL
    > file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
    > Files/root/32f87833/3b482d6c/ImplementorFactoryAssembly.DLL.
    > LOG: Attempting download of new URL
    > file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
    > Files/root/32f87833/3b482d6c/ImplementorFactoryAssembly/ImplementorFactoryAssembly.DLL.
    > LOG: Attempting download of new URL
    > file:///C:/Resources/DEV/projects/<munged>/bin/ImplementorFactoryAssembly.DLL.
    > LOG: Attempting download of new URL
    > file:///C:/Resources/DEV/projects/<munged>/bin/ImplementorFactoryAssembly/ImplementorFactoryAssembly.DLL.
    > LOG: Attempting download of new URL
    > file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
    > Files/root/32f87833/3b482d6c/ImplementorFactoryAssembly.EXE.
    > LOG: Attempting download of new URL
    > file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET
    > Files/root/32f87833/3b482d6c/ImplementorFactoryAssembly/ImplementorFactoryAssembly.EXE.
    > LOG: Attempting download of new URL
    > file:///C:/Resources/DEV/projects/<munged>/bin/ImplementorFactoryAssembly.EXE.
    > ...
    >
    >
    >
    >
    >
     
    PJ6, Mar 24, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ujjc001
    Replies:
    0
    Views:
    1,390
    ujjc001
    Jul 27, 2005
  2. sck10
    Replies:
    6
    Views:
    943
    sck10
    Sep 1, 2006
  3. =?Utf-8?B?U3RldmUgRnVuaw==?=

    Dynamic Wizard with Dynamic Validation Controls

    =?Utf-8?B?U3RldmUgRnVuaw==?=, Oct 13, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    465
    =?Utf-8?B?U3RldmUgRnVuaw==?=
    Oct 13, 2006
  4. Spondishy
    Replies:
    0
    Views:
    311
    Spondishy
    Nov 16, 2006
  5. cr88192
    Replies:
    53
    Views:
    1,247
    CBFalconer
    Apr 28, 2009
Loading...

Share This Page