Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Remoting issue

Remoting issue

Scheduled Pinned Locked Moved .NET (Core and Framework)
helpwcfwindows-adminjsonquestion
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Ludwig Stuyck
    wrote on last edited by
    #1

    Hi there, I have a smart client that uses remoting via http channel and binary formatter. It is hosted in IIS. Sending and receiving data works fine, except if a large amount of data is involved. Then I get the following error:

    An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll

    Additional information: BinaryFormatter Version incompatibility. Expected Version 1.0. Received Version 1008738336.1684104552.

    In web.config and client configuration file I specified the following:

    <channels>
    <channel ref="http">
    <clientProviders>
    <formatter ref="binary" />
    </clientProviders>
    <serverProviders>
    <formatter ref="binary" />
    <provider ref="wsdl"/>
    </serverProviders>
    </channel>
    </channels>

    Does anyone know why this error occurs and how I can solve it in order to be able to work with larger amounts of data? Thanks! Ludwig

    S 1 Reply Last reply
    0
    • L Ludwig Stuyck

      Hi there, I have a smart client that uses remoting via http channel and binary formatter. It is hosted in IIS. Sending and receiving data works fine, except if a large amount of data is involved. Then I get the following error:

      An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll

      Additional information: BinaryFormatter Version incompatibility. Expected Version 1.0. Received Version 1008738336.1684104552.

      In web.config and client configuration file I specified the following:

      <channels>
      <channel ref="http">
      <clientProviders>
      <formatter ref="binary" />
      </clientProviders>
      <serverProviders>
      <formatter ref="binary" />
      <provider ref="wsdl"/>
      </serverProviders>
      </channel>
      </channels>

      Does anyone know why this error occurs and how I can solve it in order to be able to work with larger amounts of data? Thanks! Ludwig

      S Offline
      S Offline
      SHaroz
      wrote on last edited by
      #2

      I'm not sure how you're transfering the data. If your sending a huge array of bytes, try sending a reference to the stream instead. Just have your remoted object return a stream object instead of the bytes. Hope this helps -Steve

      L 1 Reply Last reply
      0
      • S SHaroz

        I'm not sure how you're transfering the data. If your sending a huge array of bytes, try sending a reference to the stream instead. Just have your remoted object return a stream object instead of the bytes. Hope this helps -Steve

        L Offline
        L Offline
        Ludwig Stuyck
        wrote on last edited by
        #3

        I'm attaching the dataset to a container object, that is sent to the client. At the client, it then becomes the datasource of a datagrid. I need the data to be at client side completely, because data can be grouped and if not all data is present, inaccurate results are shown. So I think a reference to the data is not an option here? Anyway, I changed the configuration files. The web.config now looks like this:

        <channels>
        <channel ref="http">
        <serverProviders>
        <formatter ref="binary" />
        <provider ref="wsdl"/>
        </serverProviders>
        </channel>
        </channels>

        and the client configuration file looks like this:

        <channels>
        <channel ref="http">
        <clientProviders>
        <formatter ref="binary" /> </clientProviders>
        </channel>
        </channels>

        No I don't get the error anymore, instead I now get an 'out-of-memory' error! Ludwig

        L 1 Reply Last reply
        0
        • L Ludwig Stuyck

          I'm attaching the dataset to a container object, that is sent to the client. At the client, it then becomes the datasource of a datagrid. I need the data to be at client side completely, because data can be grouped and if not all data is present, inaccurate results are shown. So I think a reference to the data is not an option here? Anyway, I changed the configuration files. The web.config now looks like this:

          <channels>
          <channel ref="http">
          <serverProviders>
          <formatter ref="binary" />
          <provider ref="wsdl"/>
          </serverProviders>
          </channel>
          </channels>

          and the client configuration file looks like this:

          <channels>
          <channel ref="http">
          <clientProviders>
          <formatter ref="binary" /> </clientProviders>
          </channel>
          </channels>

          No I don't get the error anymore, instead I now get an 'out-of-memory' error! Ludwig

          L Offline
          L Offline
          lustuyck
          wrote on last edited by
          #4

          Well, I probably found out the reason for this behaviour. In the event log I found the message: "aspnet_wp.exe (PID: 1836) was recycled because memory consumption exceeded the 153 MB (60 percent of available RAM)." The question is... how can I avoid my dataset being filled with too much data?

          S L R 3 Replies Last reply
          0
          • L lustuyck

            Well, I probably found out the reason for this behaviour. In the event log I found the message: "aspnet_wp.exe (PID: 1836) was recycled because memory consumption exceeded the 153 MB (60 percent of available RAM)." The question is... how can I avoid my dataset being filled with too much data?

            S Offline
            S Offline
            SHaroz
            wrote on last edited by
            #5

            Sorry, I don't know. I'd really need a closer look at your code to understand what you're doing. Hopefully, someone else can give it a shot.

            1 Reply Last reply
            0
            • L lustuyck

              Well, I probably found out the reason for this behaviour. In the event log I found the message: "aspnet_wp.exe (PID: 1836) was recycled because memory consumption exceeded the 153 MB (60 percent of available RAM)." The question is... how can I avoid my dataset being filled with too much data?

              L Offline
              L Offline
              leppie
              wrote on last edited by
              #6

              Try using a PagedDataSource. I feel sorry for that web server....:laugh: WebBoxes - Yet another collapsable control, but it relies on a "graphics server" for dynamic pretty rounded corners, cool arrows and unlimited font support.

              1 Reply Last reply
              0
              • L lustuyck

                Well, I probably found out the reason for this behaviour. In the event log I found the message: "aspnet_wp.exe (PID: 1836) was recycled because memory consumption exceeded the 153 MB (60 percent of available RAM)." The question is... how can I avoid my dataset being filled with too much data?

                R Offline
                R Offline
                Rob Graham
                wrote on last edited by
                #7

                We ran into a similar issue with remoting large datasets, and came to the conclusion that if the dataset was large enough there were either memory leaks or at least garbage that was not reclaimed by GC in a timely fasion. There is an MSDN Mag article[^] that sheds some additional light on the issues. We ended up serializing the datasets ourselves, (basically into a collection of arraylists) and then reconstructing the dataset at the client from our custom object. This resulted in 30% less network bandwidth usage and a 100% speed increase. The fundamental problem seems to be that the contents of the dataset (datatables and datarelations) get seialized to XML even if the containing dataset is using a binary serializer, and in some cases this fails and some memory seems not to get reclaimed. Also, if the datasets are large, they get allocated on the large object heap which is not GC'd with the same frequency as other garbage (large objects are 'presumed' to have a longer lifetime...:(). Some ideas are so stupid that only an intellectual could have thought of them - George Orwell

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups