TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Daniel van Pletzen
NA
25
0
Problem with remoting Event
Aug 27 2007 3:12 PM
Hey I got a remoting object as a seperate DLL saved as DVRL.dll
code as below
public class RemoteClass : MarshalByRefObject
{
public delegate void MsgSentHandler(String msg);
public event MsgSentHandler MsgEvent;
public string SendMSG(string msg)
{ if (MsgEvent != null)
MsgEvent(msg);
return "Hello";
}
}
then in my server application i got
public DVRL.RemoteClass obj;
private void ServerStart()
{
TcpChannel ch = new TcpChannel(8085);
ChannelServices.RegisterChannel(ch);
RemotingConfiguration.RegisterWellKnownServiceType(typeof(DVRL.RemoteClass), "Remote",WellKnownObjectMode.Singleton);
obj = new DVRL.RemoteClass();
obj.MsgEvent += new DVRL.RemoteClass.MsgSentHandler(SayMSG);
}
private void SayMSG(String msg)
{
MessageBox.Show(msg);
}
but when i call the method SendMSG the event dont fire.. I do get the "Hello" return on the client tho
please help ;)
Reply
Answers (
0
)
help with C
Novice Problem37