CSLA exception error

CSLA exception error

Old forum URL: forums.lhotka.net/forums/t/11083.aspx


tzfj7l posted on Tuesday, January 24, 2012

Hi Rocky,

I am getting the following error while opening an report in pdf. It is working fine on my development machine and having problems on production server.

Unexpected error occured:The formatter threw and exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://ws.lhotka.net/WcfDataPortal:UpdateResult. The InnerException message was 'The constructor with parameters (SerializationInfo, StreamingContext) is not found in ISerializable type 'Microsoft.Reporting.WebForms.ReportServerException'. Please see InnerException for more details.

Thank you,

Siva

 

 

RockfordLhotka replied on Tuesday, January 24, 2012

You are trying to return a pdf document through the data portal?

You may be running into size limitations - a serialized pdf document is probably massively huge, and WCF is probably failing in the middle.

tzfj7l replied on Wednesday, January 25, 2012

The following are the settings in my App and web config files. This is not a new application. I upgraded my current application from Csla 3.5 to 4.1.

AppConfig:

            <bindings>
            <basicHttpBinding>
                <binding name="basicHttpBinding_IWcfPortal" maxReceivedMessageSize="2147483647" receiveTimeout="00:10:00"

                 sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:5:00">
               <readerQuotas maxBytesPerRead="2147483647" maxArrayLength="2147483647"

             maxStringContentLength="2147483647" maxDepth="2147483647" />
             </binding>
            </basicHttpBinding>
        </bindings>
<!--endpoint name="WcfDataPortal"
                      address= "http://www.*******.com/interactive/wcfportal.svc"
                      binding="basicHttpBinding"
                      bindingConfiguration="basicHttpBinding_IWcfPortal"
                      contract="Csla.Server.Hosts.IWcfPortal"
                      behaviorConfiguration="CompressionBehavior" />-->

WebConfig:

<basicHttpBinding>
    <binding name="basicHttpBinding_IWcfPortal"
                 maxReceivedMessageSize="2147483647"
                 receiveTimeout="00:30:00"
                 sendTimeout="00:30:00"
                 openTimeout="00:10:00"
                 closeTimeout="00:5:00">
         <readerQuotas maxBytesPerRead="2147483647"
                        maxArrayLength="2147483647"
                        maxStringContentLength="2147483647"
                        maxNameTableCharCount="2147483647"
                        maxDepth="2147483647"/>
    </binding>
   
   <binding name="basicHttpBinding_IWcfPortal_HTTPS"
      maxReceivedMessageSize="2147483647"
      receiveTimeout="00:30:00"
      sendTimeout="00:30:00"
      openTimeout="00:10:00"
      closeTimeout="00:5:00">
                        <readerQuotas
      maxBytesPerRead="2147483647"
      maxArrayLength="2147483647"
      maxStringContentLength="2147483647"
                                  maxDepth="2147483647"/>

    <security mode="Transport">
    <transport clientCredentialType="None"/>
    </security>
   </binding>
   </basicHttpBinding>

 

RockfordLhotka replied on Wednesday, January 25, 2012

Did you upgrade your server to .NET 4 at the same time? Maybe there's something different in ASP.NET or WCF 4.

In fact, it seems to me that they might have added another config size limit in .NET 4. I don't remember for sure when all the various options were added to WCF.

The one I'm thinking of goes in system.web and is the httpRuntime masRequestLength setting.

I'd recommend carefully comparing your client and server settings with the ones in the Using CSLA 4: Data Portal Configuration ebook. That's the most comprehensive coverage of the .NET 4 WCF configuration requirements.

tzfj7l replied on Wednesday, January 25, 2012

Yes Rocky we upgraded the Frame work to 4.0.

I already have the following in the webconfig file.

<system.Web>

  <sessionState timeout = "120" />

<httpRuntime maxRequestLength='2147483647"/>

I'll look into the Data Portal Configuration book one more time. Thank you.

Copyright (c) Marimer LLC