473,394 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

.Net Remoting

SOS
hi guys ,

i'm trying to learn how to use .Net Remoting !
i created a class like this :
public class MyClass : MarshalByRefObject

{

public MyClass()

{

Console.WriteLine("my object created !");

}

public void DoSomething()

{

// do sometthing here

}

}

and i use of a windows application to register this class :

public void Main()

{

HttpServerChannel channel = new HttpServerChannel(8080);

ChannelServices.RegisterChannel(channel);


RemotingConfiguration.RegisterWellKnownServiceType (typeof(MyClass),"MyClass"
,WellKnownObjectMode.Singleton);

MessageBox.Show("Registered !");

}

and finally , i use of this code to access the remote object.
but when i try to invoke a method of my remote class , this error occure :
can't connect to remote object ...

public void Main()

{

ChannelServices.RegisterChannel(new HttpServerChannel());

MyClass myclass = (MyClass)
Activator.GetObject(typeof(MyClass),"http://localhost:8080/MyClass");

if (myclass != null)

{

myclass.DoSomething();

}

}

what's wrong ?

Thanx
Nov 18 '05 #1
1 958
You're more likely to get an answer to your question in the remoting
newsgroup, instead of the ASP.NET newsgroup.
microsoft.public.dotnet.framework.remoting

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"SOS" <SOS@dd> wrote in message
news:ud**************@TK2MSFTNGP10.phx.gbl...
hi guys ,

i'm trying to learn how to use .Net Remoting !
i created a class like this :
public class MyClass : MarshalByRefObject

{

public MyClass()

{

Console.WriteLine("my object created !");

}

public void DoSomething()

{

// do sometthing here

}

}

and i use of a windows application to register this class :

public void Main()

{

HttpServerChannel channel = new HttpServerChannel(8080);

ChannelServices.RegisterChannel(channel);


RemotingConfiguration.RegisterWellKnownServiceType (typeof(MyClass),"MyClass"
,WellKnownObjectMode.Singleton);

MessageBox.Show("Registered !");

}

and finally , i use of this code to access the remote object.
but when i try to invoke a method of my remote class , this error occure :
can't connect to remote object ...

public void Main()

{

ChannelServices.RegisterChannel(new HttpServerChannel());

MyClass myclass = (MyClass)
Activator.GetObject(typeof(MyClass),"http://localhost:8080/MyClass");

if (myclass != null)

{

myclass.DoSomething();

}

}

what's wrong ?

Thanx

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sean Newton | last post by:
I am absolutely bewildered by now by the Microsoft.Samples SSPI and Security assemblies. I've been trying to set these up in a very straightforward harness in the way that I'd like to be able to...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS...
5
by: mayamorning123 | last post by:
A comparison among six VSS remote tools including SourceOffSite , SourceAnyWhere, VSS Connect, SourceXT, VSS Remoting, VSS.NET To view the full article, please visit...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed...
4
by: Uchiha Jax | last post by:
Hello everyone, I am a plenty silly person who is trying to learn .NET remoting through trial and error (all articles I read are going over my head at the moment (mostly) so I thought i'd give...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS...
0
by: Martijn Damen | last post by:
Hi, At the moment I am trying to develop an application that uses another app over .net remoting and having some problems with it (ok, that is ofcourse why I am here), hope somebody can shine a...
8
by: Raju Joseph | last post by:
Hi All, I am just trying to get an opinion here. I know this is always a tough choice to make. We are in the process of converting our VB6 based Healthcare Information System (a full-fledged...
2
by: erbilkonuk | last post by:
Hi, I am very new to .NET Remoting and I try to run a simple program to subscribe to an event raised by Remoting Class. The Remoting Server initiates an instance of Remoting Class as Singleton /...
0
by: Kristian Reukauff | last post by:
Hi I have a problem with the .Net-Securty-Functions. I've got a client and a server. When I try to register a channel at the server with this line: ChannelServices.RegisterChannel(chan, false);...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.