Obscure serialization exception -- why?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert Altland

    Obscure serialization exception -- why?

    I've encountered the following exception when deploying my solution to a load
    balanced environment:

    Unable to find assembly 'App_WebReferen ces.wayyy8_t, Version=0.0.0.0 ,
    Culture=neutral , PublicKeyToken= null'.
    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.Runtime. Serialization.S erializationExc eption:
    Unable to find assembly 'App_WebReferen ces.wayyy8_t, Version=0.0.0.0 ,
    Culture=neutral , PublicKeyToken= null'.

    Here's an overview:
    -- ASP.NET 2.0 web application
    -- ASP.NET 2.0 web service (no WSE)
    -- Proxy generated by wsdl.exe through IDE
    -- Web app uses SQL Server session, matching machine keys in web.config files
    -- Physical path to web application matches across all instances
    -- Round robin load balancing of web site and web service
    -- Web site communicates with web service through load balancer, sending and
    receiving a complex type defined in the web service application
    -- Web site shoves the resulting instance into SQL Server session
    -- Exception is thrown trying to access session item through a lazy property
    on PostBack
    -- Note that this is a SerializationEx ception, not NullReference or
    InvalidCast.

    Given that the error is a SerializationEx ception, unable to find assembly,
    and that the exception appears to be happening when attempting to use a type
    that has been defined in the web service application
    (App_WebReferen ces.xxxx), I believe removing that type from session would
    eliminate the exception. But I don't want to do a total overhaul of the
    application and service API. So I've refactored this type out into a common
    assembly that both the web site and web service use, and I've developed a
    couple of conversion methods to convert between the common type and the type
    created by wsdl.exe. I have not had the opportunity to see if this workaround
    will be successful, but I feel pretty confident that it will be.

    Just in case, and to further my own understanding, can someone explain to me
    what is causing the SerializationEx ception?


Working...