Library tutorials & articles
Introducing .NET Remoting
Introduction
.NET Remoting provides a powerful and high performance way of working with remote objects. Architecturally, .NET Remote objects are a perfect fit for accessing resources across the network without the overhead posed by SOAP based WebServices. .NET Remoting is easier to use than Java's RMI, but definately more difficult than creating a WebService.
In this article, we will create a remote object that will return an Object read in from the database. I've also included an alternate object that omits the database functionality in order to allow those that don't have a database available to still play with .NET remoting. Make sure you are using Visual Studio.NET Beta 2 when attempting this project.
Related articles
Related discussion
-
An Introduction to VB.NET and Database Programming
by bitkisel (13 replies)
-
VB.net class to connect to sql database
by militia (5 replies)
-
Compatibility Issue on Firefox to display on Cursor Location
by dinc3r (1 replies)
-
Help: MS VC++6 crash!!
by Yodin Mohd (8 replies)
-
how to process only on a selected part of an image......is there any method ....Please Help
by rajind86 (0 replies)
Related podcasts
-
Looking into the C# Crystal Ball with Charlie Calvert and Bill Wagner
One of the most exciting announcements from PDC was the news about C# 4.0 and Visual Studio 2010. With all the excitement and discussion throughout the event about these new developer tools, we reached out to two experts in the fields. Charlie Calvert and Bill Wagner sat down with Keith and Woody...
Events coming up
-
Mar
23
DevWeek 2009
London, United Kingdom
DevWeek is Europe’s leading independent conference for software developers, database professionals and IT architects, and features expert speakers on a wide range of topics, including .NET Framework 4.0, Silverlight 2, WCF 4.0, Visual Studio 2010, RESTful services, Windows Workflow, ASP.NET AJAX 4.0, SQL Server 2008, LINQ, C# 3, .NET Patterns, Ruby, and more.
forget that last post ...
I found it in my code ... non-application test code I threw in on the quick ... cause the StackOverflow.
Hey, did you ever find out what your problem was?
I got the same error on a completely different project.
Same M.O. ...
... unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll
during the first call to the object that was returned from the "Activator.GetObject()" call.
I encountered the following error message when running the ResumeClient.exe:
" An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll "
at the following line of code:
Resume resume = loader.GetResumeByUserID(1); ;
but I was able to observe the "New Reference Added!" string on the console of the ResumeSuperServer.
Could I safely assume that I already have "loader" as an object of "ResumeLoader", but I failed to obtain "resume" as an object of "Resume" ?
I was looking for a Remoting Sample for beginners for weeks and this was the first that made absolute sense to me. If you are a person with an average IQ like myself, and want to understand the basics of remoting implimentation, this is the tutorial for you!!
Thanks David for making learning Remoting easy and fun!!
I've been looking for a way to implement a cross application boundary component in C# .NET for most of this week. This looks like it will suit my needs perfectly. Thanks.
Thanks for pointing this out. I'll update the tutorial
I noticed some typo's when playing around with this. (Note I did not use the SQL example since I wanted a very simple example)
change
ResumeLoader loader = (ResumeLoader)Activator.GetObject(
typeof(ResumeServer), "tcp://localhost:9932/ResumeLoader");
if(rs==null)
to
ResumeLoader loader = (ResumeLoader)Activator.GetObject(
typeof(ResumeLoader), "tcp://localhost:9932/ResumeLoader");
if(loader==null)
Note the typeof() change and the change of the test item.
Hope that is right (I would hate to have typos in my post fixing typos)
This thread is for discussions of Introducing .NET Remoting.