Sticky Sessions, NLB, and .NET Remoting

What is Network Load Balancing (NLB) ?   http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/TechRef/6ac4a6ba-1c0c-46be-8c6a-2c2e0e567e98.mspx  What configurations does MS support in NLB at the time of this writing (Short Answer:  SingleCall)?  http://support.microsoft.com/default.aspx?scid=kb;en-us;830217 A lot of current implementations use Singletons in NLB (this configuration is possible with the framework but is not supported by Product Support Services).  What does this mean?  Well, you run into this…

0

I took some notes on some remoting questions I recently answered...

  Server activated objects (SAOs both singleton and singlecall) use threadpool magic to execute remoting calls on thread pool threads.  See ThreadPool.QueueUserWorkItem in the docs.  Also note that you can change the # of thread pool threads…the default is 25 per proc.    It is possible to share data with Singlecall object instances by having…

0

Help, I've lost my remote object!?

So this is the 1st time I’ve seen this but I guess it makes sense since I only deal with so many things.  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.  I kept getting 404 (not found)…

0

Caspol -s Behavioral changes for Whidbey

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.  It used to be that sometimes people would forget to run “caspol.exe -s on” to turn framework security on.  Imagine all the nasties that could infect your box then! Well, in…

0

The evading solution to large remoting messages

    Thanks to rick for the title!     We are seeing more and more people encountering:    Q322975 BUG: Passing large quantities of data in .NET Remoting calls causes an unexpected exception to occur – http://support.microsoft.com/?id=322975.   As you can tell from the title of the KB article, this is indeed a bug. …

5

Silly me!

I’m working on this managed application that’s doing some remoting.  The app’s got all sorts of heterogenous channels being mixed and matched….at one point I was getting an error with this text:  “Tcp channel protocol violation: expecting preamble.” I found some very interesting causes for this exception except of course in my particular scenario.  Turns…

3

Read this if you're getting an InvalidCastException when referencing a type created with AppDomain.CreateInstanceFrom

I was helping someone out with an issue the other day.  Basically we were attempting to create an instance of an object within an AppDomain and then use that object.    Unfortunately when casting the object from the object returned from CreateInstance to the desired type we were getting an InvalidCastException.  Looking at the debugger showed…

1

obj.Equals(obj) returns FALSE? For remoting objects this is TRUE!!! Confused yet?

RemoteObj obj = (RemoteObj)Activator.GetObject(typeof(RemoteObj), “http://localhost:2222/remoteobj”); // Prints “does not work” Console.WriteLine(“Remote: Equals ” + (obj.Equals(obj) ? “works” : “does not work”));   There’s a very logical explination for this behavior: 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…

0

I need to see more clearly….”Marshal BYref object”s in .NET Remoting?

I hope everyone’s a bit familiar with .NET remoting because I think I’ve confused myself. J  This post talks about the behavior of ByRef (VB.NET) and ref (C#) keywords for remoting calls.    Let’s say I have a remoting object that exposes the following method and I would like to call it from a remote…

1

Getting a NullReference Exception Generating WSDL for your Remoted Object?

Maybe you didn’t know, but you can generate a WSDL document for your remote object fairly easily.  You can generate the contract XML directly or you can use soapsuds.exe to generate a proxy dll that you can share with your consumers.  All you have to do is make a request to your remote object URI…

3