.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Remoting and transitioning from .Net 2.0 on 32-bit OS to .Net 4.0 and 64-bit OS

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :WPF

I am working on a monumental project that started years ago and I'm a little concerned with the planned transition to the current development technologies. I started it on VS 2005 and .Net 2.0, on 32-bit Windows XP, and I am about to migrate to VS 2010 on 64-bit Windows 7. I have kept the UI to a minimum so far, so the transition from WinForms to WPF should be manageable but my immediate concern is about the use of remoting. The project is for industrial automation and there are no Internet technologies coming into play there. Remoting is used for the purpose of inter-process communications, aimed at distributing computational and data-exchange loads, as well as for modularity and plug-and-play support between the various processes that constitute the project.

Latency is a major consideration. In fact, the project has a native back-end and the managed part uses P/Invoke to transfer data to it using shared memory. But all managed modules use local IPC, with the option of using TCP in non-critical cases (where the module will be on a different computer but on the same LAN). My question is: has anyone had experience with this and have there been any issues, such as incompatibilities where code needed to be fixed, or observed decrease of performance (especially latency) compared to the 32-bit case? Is there anything in particular to watch for in the transition,

View Complete Post

More Related Resource Links

Around the Horn: Engineer a Distributed System Using .NET Remoting for Process Intensive Analysis


Before the Microsoft .NET Framework, creating a distributed cluster of computers to perform scientific analysis was expensive in terms of hardware, programming and debugging time, and maintenance. You had to purchase expensive servers, spend time debugging network communication, design a distributed system completely different from a system deployed locally, and maintain a melting pot of error handling, data acquisition, networking, and analysis code. In this article, the author shows you how he was able to engineer a distributed computing system in C# to perform analysis of real-world data continuously acquired at high sampling rates, thanks to the .NET Framework.

Nate D'Anna

MSDN Magazine May 2005

Remoting: Managing the Lifetime of Remote .NET Objects with Leasing and Sponsorship


Leasing and sponsorship is the solution for managing the lifecycle of a remote object in .NET. Each object has a lease that prevents the local garbage collector from destroying it, and most distributed applications rely upon leasing. There are several ways in which objects and clients can extend the lease, including dedicated sponsor objects. In this article, the author explains leasing, shows how to configure it, and how it relates to the various remoting activation models. He then discusses design guidelines and options, along with their impact on throughput and performance. Additionally, he introduces a helper class used to automate the management of lease sponsors.

Juval Lowy

MSDN Magazine December 2003

Secure It: WS-Security and Remoting Channel Sinks Give Message-Level Security to Your SOAP Packets


As more organizations adopt XML-based Web Services, the need for message-level security has become evident. WS-Security, now supported in the Microsoft .NET Framework, addresses this need. Using the WS-Security framework, developers can implement channel sinks to intercept Remoting messages as they pass through the .NET Remoting infrastructure. The sink can read the message, change it, and pass it along. During this process, the message can be signed for added security. This article explains how to implement a Remoting channel sink that will modify the Remoting message by including a UserName token in the header, then sign the body using the token.

Neeraj Srivastava

MSDN Magazine November 2003

.NET Remoting: Create a Custom Marshaling Implementation Using .NET Remoting and COM Interop


The .NET Framework offers several methods for customizing the presentation of native .NET and COM object types. One such technique, custom marshaling, refers to the notion of specializing object type presentations. There are times, like when a legacy COM component needs to implement a new interface or when you need to make calls across process or machine boundaries, when custom marshaling saves the day. Elements of COM Interop permit the customizing of COM types while .NET Remoting offers the developer the ability to tailor native .NET types. This article examines these techniques.

Jim Sievert

MSDN Magazine September 2003

.NET Remoting: Secure Your .NET Remoting Traffic by Writing an Asymmetric Encryption Channel Sink


As .NET Remoting gains popularity in the enterprise space, it must meet business demands for trustworthy computing. Remoting traffic can be secured when objects are hosted in IIS, but when they aren't hosted in IIS, custom security solutions can be developed to secure them. This article provides an in-depth look at writing channel sinks for .NET. It also details the flow of data through custom channel sinks and explains the kinds of manipulations that can be performed on that data.

Stephen Toub

MSDN Magazine June 2003

.NET Remoting: Design and Develop Seamless Distributed Applications for the Common Language Runtime


Prior to the advent of .NET, DCOM was the underlying technology for remote communications between Windows-based applications. But DCOM is quirky to set up and configure and not as interoperable as it should be. In .NET, XML Web Services and .NET Remoting are a seamless and effective answer to the demand for tools to build distributed applications.This article provides a primer on .NET Remoting with insights into the internal plumbing. Important aspects of remoting, such as channels, object lifetime management, and clients for remote objects are discussed. In addition, some practical examples are provided.

Dino Esposito

MSDN Magazine October 2002

Remoting from WebService throws: An existing connection was forcibly closed by the remote host

Hello everyone, I have a problem with using .NET remoting from webservice. When using remoting from console application, there is no problem. I suppose problem is somewhere in IIS. My system is Windows Vista. Thank you for any help. Best regards, Jozef

Which is more secure? ClientActivated / ServerActivated Remoting ?

Hi, I want to develop a client server model where multiple clients will be passing some data to a single server. I am using .Net remoting to acheive this. I was wondering which RemotingConfiguration should I go for (ClientActivated / ServerActivated)? Please help me analyse this. Thanks, Piyush Kumat

How to Pass higher Length of Byte Array to the remoting method

Dear all,I am using a windows application and the businness logic is present in the remote server.Once particular method takes bytearray as input parameter...Whenever the method call is made the function returns value .This is limited for the particular bytearray length. (4109228 bytes).If the length of bytearray crosses 4109228 bytes.I am getting an error that "input stream is not valid binary format".How to Pass higher Length of Byte Array to the remoting method... Greater than 4 MB?I believe something is missing in web.config or app.config...?What could be the issue...? Any sugesstions are welcome....ThanksRavikumar

Remoting architecture

I have written a small application (client) that executes a single log parsing on a machine. I want to build a service application that controls the results given by the client app. I have read that Marshall-By-Reference objects could solve the problem creating a proxy that make possible the communication with remote object. The disadvantage is that I have to distribute the client application, being the client in about 100 machines (W2K3) I can't figure out how can this be done easily. The second option I read is using WCF, more modern, probably more robust... sending "object" instead of creating a communication object seems more clean to me, but is it not oriented to Web services basically? It increases complexity? Which one do you recommend? The easiest to implement? The small app was designed to work isolated and return a result object, but WCF seems the way to go.

the type initializer for 'system.runtime.remoting.identity' threw an exception.

HI, I am trying to implement kerberos delegation in Active Directory enviroment with windows 2003 servers SP2. I have Client, ProxyServer and RemoteServer application that are developed on .Net framework v3.5 using .Net Remoting "System.Runtime.Remoting". I am not using Microsoft.Samples.Security.SSPI &  Microsoft.Samples.Runtime.Remoting.Security directly. my code is based on "http://blogs.msdn.com/dotnetremoting/archive/2006/07/06/662599.aspx" Only change that I have done is put impersonate="true" in channel configuration of ProxyServer and RemoteServer, and of course changed the UPN and Port and IP address. The Client's credentials are successfully impersonated by ProxyServer, I can access the text file on ProxyServer on behalf of client. But when from ProxyServer I try to execute the method on RemoteServer it throws "the type initializer for 'system.runtime.remoting.identity' threw an exception." After looking at blog http://www.secnewsgroups.net/group/microsoft.public.dotnet.security/topic8251.aspx I did required changing under Local Security Settings -> Local Policies -> User Rights Assignments -> impersonate a client after authentication and Create Global Objects. I have added three domain user names in three machine under whose credentials corrosponding application is running. When i run three applications on their

Sharing of Non-Static member variables of a class using .NET Remoting

This kind of weird. I am trying to host an object of a class X (a class library class). This is a SAO and I have set the WellKnownMode as Singleton in the server configuration. <wellknown mode="Singleton" When multiple clients fetch the instance of the class X they can share the static member variables. Any changes made to the static variables are visible to each other. The problem is with the non-static member variables of the class. Each instance is having a local copy of the non-static variables. Why should that happen in case of a Singleton mode? Am I missing something for which this is happening? Any help will be appreciated.  A for apple, B for boy, C for c++

.NET Remoting Problem with Sponsor Renewal on CAO (Client Activated Object) Architecture

I have figured out a strange behaviour when using Client Activated Sponsorship and hope to get a hint from somebody who already got in touch with similar problems. The case is as follows: An Application is used by a server and a client. Both use (or try to use) the same objects after a user login. A lease of a session object on the server (serverSession) is initialised correctly with all of its regular remoting values in the lease for InitialLeaseTime (10) SponsorshipTimeout (5) RenewOnCallTime (10) In order to test the behaviour the values are set to seconds. It is easier to check the log every few seconds, than to wait some minutes until the Sponsorship Renewal call. If a client performs a login, the lease is according to its logged in state renewed each 10 seconds (or whatever the value is set to). So no problem so far. The lease will be alive as long as the client performs a logout, by the way it is used on a local network. Just compare the log (the renewal is firing every 10 seconds as expected): 2010-02-17 10:29:40.4338 Info Log5 SponsorObject:Renewal() 2010-02-17 10:29:50.4308 Info Log5 SponsorObject:Renewal() 2010-02-17 10:30:00.4328 Info Log5 SponsorObject:Renewal() 2010-02-17 10:30:10.4298 Info Log5 SponsorObject:Renewal() 2010-02-17 10:30:20.4318 Info Log5 SponsorObject:Renewal() 2010-02-17 10:30:30.4288 Info Log5 SponsorObject:Renewal() As soon as

Is network load balancing improved for TCP remoting in .Net 2.0 ?


The MSDN TV broadcast for improvements in .Net remoting 2.0 says that the Socket Cache for TCP has been improved to allow for better load balancing.

I cant find any other information about this.

Does this mean that Network Load Balancing is now viable for .Net Remoting 2.0 using the TCP channel ? ( some previous posts say that NLB does not work ideally with older .Net remoting TCP connections )


Remoting - SSl Certificate - https

We created a remotable type and using it through a windows service. HTTPChannel is used in windows service. Can we https for the uri and add SSL Certificate. We are using VS 2008 [.Net Framework 3.5]. not using any WCF Concepts. 

Remoting is hung up in System.Runtime.Remoting.Channels.Http.HttpServerChannel.Listen() and is not a


Hi Everyone,

We have an application that is structured as follows.

WtWindows : a remoting server that runs a exposes 2 singleton objects . We are using HTTP channels

Office Addin : This addin runs in Word , Powerpoint and Excel.

Recently a customer reported that the office and wtwindows had hung and the only way to get out of it was to restart all these applications.

The dumps from the customer show the following

<there is more in the stack trace here which is removed for clarity >

041fee74 037eda18 ParametricTechnology.Windchill.Msoi.WTWindows.ClientConnection.SetActiveDocumentInfo(System.String, System.String, IntPtr)
041ff2b8 79e71b4c [HelperMethodFrame_PROTECTOBJ: 041ff2b8] System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr, System.Object[], System.Object, Int32, Boolean, System.Object[] ByRef)
041ff3fc 79279583 System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(System.RuntimeMethodHandle, System.Object[], System.Object, Int32, Boolean, System.Object[] ByRef)
041ff420 7927039b System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage, Int32, Boolean)
041ff47c 7927024c System.

TCP .NET Remoting never seems to work with Windows 7



I have never been able to get our .NET remoting (3.5) application to work on Windows 7.  Windows Server 2003 R2 is running a Windows .NET service running .NET 3.5.  The client is a .NET 3.5 Winforms application trying to connect to the server.

The client always times out connecting to the server.  The firewall is off (stopped the service in Windows 7)

There are no issues when using Windows XP to connect to the server.

We've tried everything - stopping firewall, adding exceptions in Win7, etc. 

Does anyone know what could possibly be going on?  Again, we've tried everything obvious.


Thanks for the help.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend