![]() |
Показаны 1 сообщений на этой странице |
Форум сетевых администраторов (http://netadmin.ws/forum/index.php)
- Другие (http://netadmin.ws/forum/forumdisplay.php?forumid=19)
-- Наболевшие проблемы с NET Remoting ("RemotingException: Requested service not found") (http://netadmin.ws/forum/showthread.php?threadid=12667)
Наболевшие проблемы с NET Remoting ("RemotingException: Requested service not found")
Добрый день,
Я изучаю технологию NET Remoting. Ð_уководствуясь инструкциями на множестве форумов, в MSDN'е и на rsdn.ru, я создал тестовый сервер и клиент (в который раз …). Но при запуске клиента мне выдается следующее сообщение:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Runtime.Remoting.RemotingException: Requested Service not found
Server stack trace:
at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at MyCoolClass.addthemall(Int32 first, Int32 second)
at WindowsClient.MyForm.CalculateLinkLabel_LinkClicked(Object sender, LinkLabelLinkClickedEventArgs e) in C:\Documents and Settings\Administrator\My Documents\ServerApplication\WindowsClient\MyForm.cs:line 33
at ...
public class MyCoolClass : MarshalByRefObject
{
public void addthemall(int first, int second)
{
MessageBox.Show((first + second).ToString() + "\n" + Assembly.GetExecutingAssembly().Location + "\n" + Thread.CurrentThread.CurrentUICulture.ToString() + "\n" + Assembly.GetExecutingAssembly().FullName);
}
}
class Program
{
static void Main(string[] args)
{
ChannelServices.RegisterChannel(new TcpServerChannel(8082), false);
RemotingConfiguration.ApplicationName = "MyCoolApp";
RemotingConfiguration.RegisterWellKnownServiceType(typeof(MyCoolClass), "MyCoolClass", WellKnownObjectMode.SingleCall);
System.Console.Write("Processing connections ...");
Console.ReadLine();
}
}
namespace WindowsClient
{
public partial class MyForm : Form
{
public MyForm()
{
InitializeComponent();
}
private void CalculateLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
ChannelServices.RegisterChannel(new TcpClientChannel(), false);
RemotingConfiguration.RegisterWellKnownClientType(typeof(MyCoolClass), "tcp://localhost:8082/MyCoolApp/MyCoolClass.rem");
MyCoolClass MCC = new MyCoolClass();
MCC.addthemall(Int32.Parse(this.NumTextBox1.Text),Int32.Parse(this.NumTextBox2.Text));
}
}
}
. Помогите пожалуйста понять в чем проблема. Что я делаю не так?| Формат времени GMT. Текущее время 07:33. | Показаны 1 сообщений на этой странице |
Powered by: vBulletin Version 2.2.4
Copyright © Jelsoft Enterprises Limited 2000, 2001.