<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>robgruen's WebLog : .NET Remoting</title><link>http://blogs.msdn.com/robgruen/archive/tags/.NET+Remoting/default.aspx</link><description>Tags: .NET Remoting</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Sticky Sessions, NLB, and .NET Remoting</title><link>http://blogs.msdn.com/robgruen/archive/2005/07/25/442927.aspx</link><pubDate>Mon, 25 Jul 2005 14:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:442927</guid><dc:creator>robgruen</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/442927.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=442927</wfw:commentRss><description>&lt;P&gt;What is Network Load Balancing (NLB)&amp;nbsp;?&amp;nbsp;&amp;nbsp; &lt;A href="http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/TechRef/6ac4a6ba-1c0c-46be-8c6a-2c2e0e567e98.mspx"&gt;http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/TechRef/6ac4a6ba-1c0c-46be-8c6a-2c2e0e567e98.mspx&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What configurations does MS support in NLB at the time of this writing (Short Answer:&amp;nbsp; SingleCall)?&amp;nbsp; &lt;A href="http://support.microsoft.com/default.aspx?scid=kb;en-us;830217"&gt;http://support.microsoft.com/default.aspx?scid=kb;en-us;830217&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;A lot of current implementations use Singletons in NLB (this configuration is possible with the&amp;nbsp;framework but is not supported by Product&amp;nbsp;Support Services).&amp;nbsp; What does this mean?&amp;nbsp; Well, you run into this error:&amp;nbsp; System.Net.WebException, "the underlying connection was closed."&amp;nbsp; &amp;nbsp;Typically this occurs because the NLB solution sends a reset on the port of the server.&amp;nbsp; Generally you can fix this by configuring sticky sessions on your NLB hardware/software.&amp;nbsp; If your NLB solution doesn't offer this take your singleton off of NLB or switch to using webservices.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=442927" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/.NET+Remoting/default.aspx">.NET Remoting</category></item><item><title>I took some notes on some remoting questions I recently answered...</title><link>http://blogs.msdn.com/robgruen/archive/2005/07/07/436604.aspx</link><pubDate>Fri, 08 Jul 2005 00:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:436604</guid><dc:creator>robgruen</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/436604.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=436604</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in" type=disc&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;Server activated objects (SAOs both singleton and singlecall) use threadpool magic to execute remoting calls on thread pool threads.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;See &lt;A href="http://msdn2.microsoft.com/library/b2b9a8h2(en-us,vs.80).aspx"&gt;ThreadPool.QueueUserWorkItem&lt;/A&gt; in the docs.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Also note that you can change the # of thread pool threads…the default is 25 per proc.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-ALIGN: justify"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in" type=disc&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;It is possible to share data with Singlecall object instances by having static members in the shared class.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I would only recommend this for read-only scenarios and use Singletons for any other scenario.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Keep in mind that you are responsible for thread safety.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL style="MARGIN-TOP: 0in" type=disc&gt;
&lt;LI class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify; mso-list: l0 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;Both the TCP and HTTP channels were designed to assume that there is network connectivity.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Using these channels between processes on the same box that’s disconnected from the network won’t work out of the box.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;To get this to work you have to bind the channel to the loopback address (either 127.0.0.1 or 0.0.0.0).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In .NET 2.0 you can simply use the IPC channel to do remoting sans network.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 99pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;channels&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 99pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;channel ref="http" port="8889" bindTo="127.0.0.1"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 99pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/channel&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 99pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/channels&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=436604" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Misc+.Net+Runtime/default.aspx">Misc .Net Runtime</category><category domain="http://blogs.msdn.com/robgruen/archive/tags/.NET+Remoting/default.aspx">.NET Remoting</category></item><item><title>Help, I've lost my remote object!?</title><link>http://blogs.msdn.com/robgruen/archive/2005/06/22/431706.aspx</link><pubDate>Wed, 22 Jun 2005 22:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:431706</guid><dc:creator>robgruen</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/431706.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=431706</wfw:commentRss><description>&lt;P&gt;So this is the 1st time I've seen this but I guess it makes sense since I only deal with so many things.&amp;nbsp; I was helping someone setup IIS hosting of a remote object but for the life of me I couldn't get it working on this W2k3 box.&amp;nbsp; I kept getting 404 (not found) when attempting to invoke the remote object.&amp;nbsp; We'd switch to XP and everything's kosher...back to W2k3 with the same code and it wouldn't work.&amp;nbsp; I checked the IIS logs and found my entry but still no luck.&amp;nbsp; I even ran filemon to see if the config file for the object was getting touched by IIS/ASP.NET but nada.&lt;/P&gt;
&lt;P&gt;IIS Log:&lt;/P&gt;
&lt;P&gt;2005-06-22 17:10:43&amp;nbsp;XX.XX.XX.XX GET /Remoting/RemoteObj.rem - 80 - XX.XX.XX.XX HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+5.1.2600.0;+MS+.NET+Remoting;+MS+.NET+CLR+1.1.4322.2032+) webserver98 404 0 2&lt;/P&gt;
&lt;P&gt;Well, after consulting with Adam it turns out this is a "feature" of IIS 6:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;“HTTP Error 404” – File or Directory no found” error message when you request dynamic content with IIS 6.0 - &lt;A title=http://support.microsoft.com/?id=315122 href="http://support.microsoft.com/?id=315122"&gt;http://support.microsoft.com/?id=315122&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;and for reference purposes:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Verdana size=2&gt;&lt;SPAN&gt;Web service extension lockdown policy prevents this request.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN&gt;IIS Status Codes - &lt;A title=http://support.microsoft.com/?id=318380 href="http://support.microsoft.com/?id=318380"&gt;http://support.microsoft.com/?id=318380&lt;/A&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=431706" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/.NET+Remoting/default.aspx">.NET Remoting</category></item><item><title>Caspol -s Behavioral changes for Whidbey</title><link>http://blogs.msdn.com/robgruen/archive/2005/06/13/428595.aspx</link><pubDate>Mon, 13 Jun 2005 17:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:428595</guid><dc:creator>robgruen</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/428595.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=428595</wfw:commentRss><description>&lt;P&gt;We generally use "caspol.exe -s off" as a quick test to determine if .NET framework security plays a part in problems with managed components.&amp;nbsp; It used to be that sometimes people would forget to run "caspol.exe -s on" to turn framework security on.&amp;nbsp; Imagine all the nasties that could infect your box then!&lt;/P&gt;
&lt;P&gt;Well, in Whidbey things are different.&amp;nbsp; Now when you run caspol to turn off .NET framework security you see this in the console window:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr&gt;
&lt;BLOCKQUOTE dir=ltr&gt;
&lt;P&gt;&lt;FONT size=1&gt;c:\Program Files\Microsoft Visual Studio 8\VC&amp;gt;caspol -s off&lt;BR&gt;Microsoft (R) .NET Framework CasPol 2.0.50603.0&lt;BR&gt;c Microsoft Corporation. All rights reserved.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=1&gt;CAS enforcement is being turned off temporarily. Press &amp;lt;enter&amp;gt; when you want to&lt;BR&gt;restore the setting back on.&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So, now there's chance that security will be comprimised by you forgetting to turn security off since it's temporary.&amp;nbsp; You may ask what happens if caspol terminates unexpectedly?&amp;nbsp; Good question, I tested it!&lt;/P&gt;
&lt;P&gt;If caspol.exe terminates before you hit &amp;lt;enter&amp;gt; to turn security back on &lt;STRONG&gt;it will revert&amp;nbsp;to the ON state.&amp;nbsp; &lt;/STRONG&gt;Here's another side note, running caspol -s on doesn't do anything.&amp;nbsp; You'll see this for output when you try turn security on:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr&gt;
&lt;BLOCKQUOTE dir=ltr&gt;
&lt;P&gt;&lt;FONT size=1&gt;c:\Program Files\Microsoft Visual Studio 8\VC&amp;gt;caspol -s on&lt;BR&gt;Microsoft (R) .NET Framework CasPol 2.0.50603.0&lt;BR&gt;c Microsoft Corporation. All rights reserved.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=1&gt;Because security can no longer be turned off, turning on security does not have&lt;BR&gt;any effect.&lt;BR&gt;Success&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=1&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=428595" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Misc+.Net+Runtime/default.aspx">Misc .Net Runtime</category><category domain="http://blogs.msdn.com/robgruen/archive/tags/Debugging/default.aspx">Debugging</category><category domain="http://blogs.msdn.com/robgruen/archive/tags/.NET+Remoting/default.aspx">.NET Remoting</category></item><item><title>The evading solution to large remoting messages</title><link>http://blogs.msdn.com/robgruen/archive/2005/05/02/414090.aspx</link><pubDate>Mon, 02 May 2005 21:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:414090</guid><dc:creator>robgruen</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/414090.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=414090</wfw:commentRss><description>&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal align=center&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal align=center&gt;&lt;SPAN&gt;Thanks to rick for the title!&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;We are seeing more and more people encountering:&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Q322975 BUG: Passing large quantities of data in .NET Remoting calls causes an unexpected exception to occur - &lt;A href="http://support.microsoft.com/?id=322975"&gt;http://support.microsoft.com/?id=322975&lt;/A&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;As you can tell from the title of the KB article, this is indeed a bug.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Unfortunately the behavior addressed by this knowledgebase article is more of a “by design” problem than a coding error.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Remoting was never designed for large messages and to my knowledge no testing was done on the types of large messages that cause the errors mentioned in the KB article.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;From what I have seen with remoting a “typical” remoting capsule is in the neighborhood of 16k – 32k (This is a very generous estimate).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;There’s a HUGE difference between 32k and &amp;gt; ~5MB.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Taking the development stance you can see why this behavior is by design.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;However, taking the implementer’s stance, we can see that when using datasets and other complex objects real world scenarios can easily exceed 32k.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Developers don’t like fixing code that has an “easy” work around, and implementers don’t want to compromise their design or already coded applications.&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;What can be done?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Well, the last time I checked both you and I lived in the real world, so here are some real world things that can be done to mitigate seeing the SocketException from Q322975.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;The source of this exception is actually within the networking stack and is courtesy of the implementation of one or another socket library.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Since I’m not familiar with that code I’ve had to speculate about a few things and can tell you this:&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;The error is somewhat hardware bound and throwing hardware at it has mildly successful results.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;For example, I’d see this problem sooner and more often on a PIII 600 Mhz with 256MB Ram and lest often on a P4 3.6 Ghz with 2GB of Ram.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I’m under the impression that the buffering of the incoming data is somewhat dependent on the system hardware.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;That means that this exception can be alleviated to some extent but not eliminated.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;This is kind of like taking some cold medication; the medicine suppresses the symptoms but you still have the cold…it just may or may not be there when the medicine wears off.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;If you’ve already maxed out the hardware and want the least impact to your existing codebase possible, you can create a new remoting channel that implements some level of data compression.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Think of this as zipping up all of your remoting messages.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Of course this requires the minor change of modifying your remoting configuration.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;It might cost you time and money depending on your ability/willingness to write your own channel implementation.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;You can certainly save both time and money by using a 3&lt;SUP&gt;rd&lt;/SUP&gt; party channel implementation such as the one provided by &lt;A href="http://www.genuinechannels.com/"&gt;GenuineChannels&lt;/A&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;A more involved solution includes actually modifying your code to a slightly larger extent.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;The benefit of this option however is that it’s not as involved as writing your own channel and does not involve the acquisition of a 3&lt;SUP&gt;rd&lt;/SUP&gt; party product.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Another type of compression that can be implemented is actually shrinking the remoting message by excluding that data which is not needed by the client.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;Please consider the following KB article: &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Q829740 Improving DataSet Serialization and Remoting Performance – &lt;A href="http://support.microsoft.com/?id=829740"&gt;http://support.microsoft.com/?id=829740&lt;/A&gt;. &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Simply put, you modify the serialization of types you pass via remoting in such a way that you are sending only data that is necessary on the other side of the remoting call.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI class=MsoNormal&gt;&lt;SPAN&gt;The last option is indicated in the original KB article:&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;chunk your data into smaller pieces.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;This work around involves modifying those calls that generate huge messages into several smaller pieces.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;I recommend that messages probably shouldn’t exceed 2 MB as I’ve never seen this exception on messages smaller than twice that size.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=414090" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Misc+.Net+Runtime/default.aspx">Misc .Net Runtime</category><category domain="http://blogs.msdn.com/robgruen/archive/tags/.NET+Remoting/default.aspx">.NET Remoting</category></item><item><title>Silly me!</title><link>http://blogs.msdn.com/robgruen/archive/2005/04/28/413258.aspx</link><pubDate>Fri, 29 Apr 2005 00:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:413258</guid><dc:creator>robgruen</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/413258.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=413258</wfw:commentRss><description>&lt;P&gt;I'm working on this managed application that's doing some remoting.&amp;nbsp; The app's got all sorts of heterogenous channels being mixed and matched....at one point I was getting an error with this text:&amp;nbsp; &lt;FONT color=#ff0000&gt;"Tcp channel protocol violation: expecting preamble."&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000000&gt;I found some very interesting causes for this exception except of course in my particular scenario.&amp;nbsp; Turns out that I was trying to make a tcp:// request to a http:// server channel.&amp;nbsp; Whoops!&amp;nbsp; Anyway, I figured I'd share since I didn't see any other info out there for this error with this cause.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=413258" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/.NET+Remoting/default.aspx">.NET Remoting</category></item><item><title>Read this if you're getting an InvalidCastException when referencing a type created with AppDomain.CreateInstanceFrom</title><link>http://blogs.msdn.com/robgruen/archive/2005/04/05/405763.aspx</link><pubDate>Wed, 06 Apr 2005 05:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:405763</guid><dc:creator>robgruen</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/405763.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=405763</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Georgia&gt;I was helping someone out with an issue the other day.&amp;nbsp; Basically we were attempting to create an instance of an object within an AppDomain and then use that object.&amp;nbsp;&amp;nbsp;&amp;nbsp; Unfortunately when casting the object from the object returned from CreateInstance to the desired type we were getting an InvalidCastException.&amp;nbsp; L&lt;/FONT&gt;&lt;FONT face=Georgia&gt;o&lt;/FONT&gt;&lt;FONT face=Georgia&gt;oking at the debugger showed that both types were identical (base folder, version, key, etc.).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Georgia&gt;The code looks something like this:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;
&lt;BLOCKQUOTE dir=ltr&gt;
&lt;BLOCKQUOTE dir=ltr&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt;object&lt;/FONT&gt; obj = domain.CreateInstanceAndUnwrap(@"C:\CustomAssembly.dll", "CustomObjects.Class1");&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=1&gt;Type t = obj.GetType();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=1&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=1&gt;CustomObjects.Class1 obj;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=1&gt;obj = (CustomObjects.Class1)obj;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P dir=ltr&gt;&lt;FONT face=Georgia size=3&gt;To make the problem more hard to diagnose if I created a new AppDomain and then created the type in the new AppDomain: &lt;FONT color=#800080&gt;what do you know, no problem!&lt;/FONT&gt;&amp;nbsp; After careful inspection I noticed two instances of CustomAssembly.dll loaded at different offsets within the domain.&amp;nbsp; Turns out the reference in my project for CustomAssembly and the path I was passing into CreateInstance pointed to two different physical files.&amp;nbsp; Change the call to CreateInstance so it passes in the path that is referenced in the assembly and you're problem's solved.&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=405763" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Misc+.Net+Runtime/default.aspx">Misc .Net Runtime</category><category domain="http://blogs.msdn.com/robgruen/archive/tags/.NET+Remoting/default.aspx">.NET Remoting</category></item><item><title>obj.Equals(obj) returns FALSE?  For remoting objects this is TRUE!!!  Confused yet?</title><link>http://blogs.msdn.com/robgruen/archive/2005/02/28/381809.aspx</link><pubDate>Mon, 28 Feb 2005 23:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:381809</guid><dc:creator>robgruen</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/381809.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=381809</wfw:commentRss><description>&lt;font size="2"&gt;&lt;font size="2"&gt; &lt;p&gt;&lt;/font&gt;&lt;font face="Courier New" size="1"&gt;RemoteObj obj = (RemoteObj)Activator.GetObject(typeof(RemoteObj), "&lt;/font&gt;&lt;a href="http://localhost:2222/remoteobj"&gt;&lt;u&gt;&lt;font color="#0000ff"&gt;&lt;font face="Courier New" size="1"&gt;http://localhost:2222/remoteobj&lt;/font&gt;&lt;/u&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="Courier New" size="1"&gt;");&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New" size="1"&gt;// Prints "does not work"&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New" size="1"&gt;Console.WriteLine("Remote: Equals " + (obj.Equals(obj) ? "works" : "does not work"));&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;There's a very logical explination for this behavior:&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font face="Courier New"&gt;When you call Equals() on the __TransparentProxy for your remoting object the call is actually getting forwarded to your remoted object. Inside of your remoted object Equals is called with the parameter that was passed in which in this case is a __TransparentProxy. So, Equals compares your RemoteObject with __TransparentProxy and determines that the two objects are not the same.&lt;/font&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;font face="Courier New"&gt;You can verify that this is the case simply by overriding Equals in your remote object, put a breakpoint there and see that this = RemotingObject and obj = __TransparentProxy.&amp;nbsp; When comparing these objects they are not the same and Equals returns false.&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=381809" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/.NET+Remoting/default.aspx">.NET Remoting</category></item><item><title>I need to see more clearly….”Marshal BYref object”s in .NET Remoting?</title><link>http://blogs.msdn.com/robgruen/archive/2005/01/26/360930.aspx</link><pubDate>Wed, 26 Jan 2005 21:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:360930</guid><dc:creator>robgruen</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/360930.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=360930</wfw:commentRss><description>&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;I hope everyone’s a bit familiar with .NET remoting because I think I’ve confused myself. &lt;/span&gt;&lt;span style="FONT-FAMILY: Wingdings; mso-hansi-font-family: Arial; mso-ascii-font-family: Arial; mso-char-type: symbol; mso-symbol-font-family: Wingdings; mso-bidi-font-family: Arial"&gt;&lt;span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings"&gt;J&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This post talks about the behavior of ByRef (VB.NET) and ref (C#) keywords for remoting calls.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;Let’s say I have a remoting object that exposes the following method and I would like to call it from a remote client.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; PassDataSet(&lt;span style="COLOR: blue"&gt;ref&lt;/span&gt; System.Data.DataSet ds)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'"&gt;&lt;span style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ds.Tables.Add();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'"&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;Does this even work?&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Why, yes, yes it does!&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;And even better, does the remote client see the changes that were made on the server side…it sure does.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Pretty crazy hunh!&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;“What the heck is going on here?” you may ask.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;How is it possible to pass pointer to an object to a remote server?&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;Well, this isn’t what’s happening.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;When you specify &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vclrfPassingMethodParameters.asp"&gt;ref&lt;/a&gt; or &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcn7/html/vaconArgumentPassingMechanism.asp"&gt;ByRef&lt;/a&gt; on a remote function the .net framework actually serializes your parameter and adds it to the remoting message.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;So, in this instance when I call PassDataSet the data set is serialized on the client, added to the remoting message and passed to the server.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The server then deseralizes the remoting message, including the dataset.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The code on the server then adds a table to the dataset, creates the return remoting message, serializes the updated dataset, and adds it to the return message.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Then, on the client side the framework deserializes the message and dataset and then updates your copy of the dataset with the version returned in the remoting message.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;See the SOAP message of this call:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;POST /RemoteObject.rem HTTP/1.1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;User-Agent: Mozilla/4.0+(compatible; MSIE 6.0; Windows 5.1.2600.0; MS .NET Remoting; MS .NET CLR 1.1.4322.2032 )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;Content-Type: text/xml; charset="utf-8"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;SOAPAction: "http://schemas.microsoft.com/clr/nsassem/RemoteObjectNamespace.RemoteObject/RemoteObject#PassDataSet"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;Content-Length: 1516&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;Expect: 100-continue&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;Connection: Keep-Alive&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;Host: localhost:8888&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&amp;lt;SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&amp;lt;SOAP-ENV:Body&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&amp;lt;i2:PassDataSet id="ref-1" xmlns:i2="http://schemas.microsoft.com/clr/nsassem/RemoteObjectNamespace.RemoteObject/RemoteObject"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&amp;lt;ds href="#ref-4"/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&amp;lt;/i2:PassDataSet&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&amp;lt;a1:DataSet id="ref-4" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/System.Data/System.Data%2C%20Version%3D1.0.5000.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&amp;lt;XmlSchema id="ref-5"&amp;gt;&amp;amp;#60;?xml version=&amp;amp;#34;1.0&amp;amp;#34; encoding=&amp;amp;#34;utf-16&amp;amp;#34;?&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&amp;amp;#60;xs:schema id=&amp;amp;#34;emptydataset&amp;amp;#34; xmlns=&amp;amp;#34;&amp;amp;#34; xmlns:xs=&amp;amp;#34;http://www.w3.org/2001/XMLSchema&amp;amp;#34; xmlns:msdata=&amp;amp;#34;urn:schemas-microsoft-com:xml-msdata&amp;amp;#34;&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&amp;amp;#60;xs:element name=&amp;amp;#34;emptydataset&amp;amp;#34; msdata:IsDataSet=&amp;amp;#34;true&amp;amp;#34;&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;amp;#60;xs:complexType&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;amp;#60;xs:choice maxOccurs=&amp;amp;#34;unbounded&amp;amp;#34; /&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;amp;#60;/xs:complexType&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&amp;amp;#60;/xs:element&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&amp;amp;#60;/xs:schema&amp;amp;#62;&amp;lt;/XmlSchema&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&amp;lt;XmlDiffGram id="ref-6"&amp;gt;&amp;amp;#60;diffgr:diffgram xmlns:msdata=&amp;amp;#34;urn:schemas-microsoft-com:xml-msdata&amp;amp;#34; xmlns:diffgr=&amp;amp;#34;urn:schemas-microsoft-com:xml-diffgram-v1&amp;amp;#34; /&amp;amp;#62;&amp;lt;/XmlDiffGram&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&amp;lt;/a1:DataSet&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&amp;lt;/SOAP-ENV:Body&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966; FONT-FAMILY: Arial"&gt;&amp;lt;/SOAP-ENV:Envelope&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;And the return message from the server (note the added table to the dataset):&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;HTTP/1.1 100 Continue&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;HTTP/1.1 200 OK&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;Content-Type: text/xml; charset="utf-8"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;Server: MS .NET Remoting, MS .NET CLR 1.1.4322.2032&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;Content-Length: 1734&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&amp;lt;SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&amp;lt;SOAP-ENV:Body&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&amp;lt;i2:PassDataSetResponse id="ref-1" xmlns:i2="http://schemas.microsoft.com/clr/nsassem/RemoteObjectNamespace.RemoteObject/RemoteObject"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&amp;lt;return&amp;gt;1&amp;lt;/return&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&amp;lt;ds href="#ref-4"/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&amp;lt;/i2:PassDataSetResponse&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&amp;lt;a1:DataSet id="ref-4" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/System.Data/System.Data%2C%20Version%3D1.0.5000.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&amp;lt;XmlSchema id="ref-5"&amp;gt;&amp;amp;#60;?xml version=&amp;amp;#34;1.0&amp;amp;#34; encoding=&amp;amp;#34;utf-16&amp;amp;#34;?&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&amp;amp;#60;xs:schema id=&amp;amp;#34;emptydataset&amp;amp;#34; xmlns=&amp;amp;#34;&amp;amp;#34; xmlns:xs=&amp;amp;#34;http://www.w3.org/2001/XMLSchema&amp;amp;#34; xmlns:msdata=&amp;amp;#34;urn:schemas-microsoft-com:xml-msdata&amp;amp;#34;&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&amp;amp;#60;xs:element name=&amp;amp;#34;emptydataset&amp;amp;#34; msdata:IsDataSet=&amp;amp;#34;true&amp;amp;#34;&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;amp;#60;xs:complexType&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;amp;#60;xs:choice maxOccurs=&amp;amp;#34;unbounded&amp;amp;#34;&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;amp;#60;xs:element name=&amp;amp;#34;Table1&amp;amp;#34;&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;amp;#60;xs:complexType&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;amp;#60;/xs:complexType&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;amp;#60;/xs:element&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;amp;#60;/xs:choice&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;amp;#60;/xs:complexType&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&amp;amp;#60;/xs:element&amp;amp;#62;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&amp;amp;#60;/xs:schema&amp;amp;#62;&amp;lt;/XmlSchema&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&amp;lt;XmlDiffGram id="ref-6"&amp;gt;&amp;amp;#60;diffgr:diffgram xmlns:msdata=&amp;amp;#34;urn:schemas-microsoft-com:xml-msdata&amp;amp;#34; xmlns:diffgr=&amp;amp;#34;urn:schemas-microsoft-com:xml-diffgram-v1&amp;amp;#34; /&amp;amp;#62;&amp;lt;/XmlDiffGram&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&amp;lt;/a1:DataSet&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&amp;lt;/SOAP-ENV:Body&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: olive; FONT-FAMILY: Arial"&gt;&amp;lt;/SOAP-ENV:Envelope&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;If you modify the method definition so that the dataset is not passed “by reference” the incoming remoting message will remain the same.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The return message from the server will not have the &amp;lt;a1:DataSet…&amp;gt;&amp;lt;/a1:DataSet&amp;gt; element.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;As you can imagine, this could severely impact your applications performance depending on the size of your dataset.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;There’s a KB article that talks about improving dataset Serialization that may help here:&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;a href="http://support.microsoft.com/?id=829740"&gt;Q892740 Improving DataSet Serialization and Remoting Performance&lt;/a&gt;.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;However, if you’re not passing in a DataSet but rather a complex object type this won’t help. &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;What to do?&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The best thing would to create your own custom serializer or only serialize those properties of your object that will be modified on the other side of your remoting boundarie.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;One quick note:&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This marshaling behavior works for the DataSet since it is marked as serializable.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;If the parameter you are trying to pass as “ref” or “byref” isn’t serializeable you’ll get the following exception:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: center" align="center"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: Arial"&gt;An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: center" align="center"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: center" align="center"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: Arial"&gt;Additional information: The type RemoteObjectNamespace.RemoteThrowException in Assembly RemoteObject, Version=1.0.1851.26880, Culture=neutral, PublicKeyToken=null is not marked as serializable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;So, where does that leave us?&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;If you truly want to marshal an object across remoting boundaries via reference your object has to inherit from MarshalByRefObject or implement the necessary interfaces.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;If that isn’t an option you have to make some performance tradeoffs.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;It’s all in a days work for you architects!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=360930" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/.NET+Remoting/default.aspx">.NET Remoting</category></item><item><title>Getting a NullReference Exception Generating WSDL for your Remoted Object?</title><link>http://blogs.msdn.com/robgruen/archive/2004/12/16/319391.aspx</link><pubDate>Thu, 16 Dec 2004 23:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:319391</guid><dc:creator>robgruen</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/robgruen/comments/319391.aspx</comments><wfw:commentRss>http://blogs.msdn.com/robgruen/commentrss.aspx?PostID=319391</wfw:commentRss><description>&lt;span style="FONT-FAMILY: Helvetica"&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;Maybe you didn’t know, but you can generate a WSDL document for your remote object fairly easily.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;You can generate the contract XML directly or you can use &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfSoapsudsUtilitySoapSudsexe.asp"&gt;soapsuds.exe&lt;/a&gt; to generate a proxy dll that you can share with your consumers.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;All you have to do is make a request to your remote object URI and append &lt;b style="mso-bidi-font-weight: normal"&gt;?WSDL &lt;/b&gt;and you’re done.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;So let’s say I was hosing a remote object called RemOBj on my local machine on port 8081 and I specified it’s URI as RemOBJ.rem.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;To activate this object I’d make remote requests to:&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;a href="http://localhost:8081/RemoOBJ.rem"&gt;http://localhost:8081/RemoOBJ.rem&lt;/a&gt;. &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;If I wanted to get the WSDL for this I’d request &lt;a href="http://localhost:8081/RemoOBJ.rem?wsdl"&gt;http://localhost:8081/RemoOBJ.rem?wsdl&lt;/a&gt;. &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;You can make this request in IE for your remote object to see the output.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: justify"&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;There are some cases however where this will fail and in IE you’ll see the following information:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: Helvetica"&gt;System.NullReferenceException: Object reference not set to an instance of an object. at System.Runtime.Remoting.MetadataServices.RealSchemaType.Resolve(StringBuilder sb) at System.Runtime.Remoting.MetadataServices.XMLNamespace.Resolve() at System.Runtime.Remoting.MetadataServices.WsdlGenerator.Resolve() at System.Runtime.Remoting.MetadataServices.WsdlGenerator.Generate() at System.Runtime.Remoting.MetadataServices.SUDSGenerator.Generate() at System.Runtime.Remoting.MetadataServices.MetaData.ConvertTypesToSchemaToStream(ServiceType[] serviceTypes, SdlType sdlType, Stream outputStream) at System.Runtime.Remoting.MetadataServices.SdlChannelSink.GenerateSdl(SdlType sdlType, IServerResponseChannelSinkStack sinkStack, ITransportHeaders requestHeaders, ITransportHeaders responseHeaders, Stream&amp;amp; outputStream) at System.Runtime.Remoting.MetadataServices.SdlChannelSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage&amp;amp; responseMsg, ITransportHeaders&amp;amp; responseHeaders, Stream&amp;amp; responseStream) at System.Runtime.Remoting.Channels.Http.HttpServerTransportSink.ServiceRequest(Object state) at System.Runtime.Remoting.Channels.SocketHandler.ProcessRequestNow()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;If you tried to create a proxy with soapsuds you’d see this exeception:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;span style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: 'MS Sans Serif'; mso-bidi-font-family: 'MS Sans Serif'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: 'MS Sans Serif'; mso-bidi-font-family: 'MS Sans Serif'"&gt;Error: Unable to retrieve schema from url: http://localhost:8081/RemOBJ.rem?wsdl, The remote server returned an error: (500) Internal Server Error.&lt;/span&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;If you are seeing either of these and your remote object implementation and remote object interface are defined in separate assemblies you can try one of the following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; tab-stops: list .75in; mso-list: l0 level1 lfo1"&gt;&lt;span style="FONT-FAMILY: Helvetica; mso-bidi-font-family: Helvetica; mso-fareast-font-family: Helvetica"&gt;&lt;span style="mso-list: Ignore"&gt;1.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;Place the interface definition and implementation in the same assembly.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; tab-stops: list .75in; mso-list: l0 level1 lfo1"&gt;&lt;span style="FONT-FAMILY: Helvetica; mso-bidi-font-family: Helvetica; mso-fareast-font-family: Helvetica"&gt;&lt;span style="mso-list: Ignore"&gt;2.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;Ensure that the interface and implementation are rooted in different namespaces.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-FAMILY: Helvetica"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=319391" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/robgruen/archive/tags/Misc+.Net+Runtime/default.aspx">Misc .Net Runtime</category><category domain="http://blogs.msdn.com/robgruen/archive/tags/.NET+Remoting/default.aspx">.NET Remoting</category></item></channel></rss>