Re: Requested Service Not Found is killing me...
- From: "zdrakec" <zdrakec@xxxxxxxxx>
- Date: 6 Dec 2006 06:42:29 -0800
So sorry not to post the solution. It was actually a trivial fix. The
code on the client side, that went
Dim url As String = "tcp://" & ServerName & ":10000/Program
Files/processing/ServiceClass"
was actually referencing the wrong service name. It needed to say
Dim url As String = "tcp://" & ServerName & ":10000/ServiceClass"
Once I observed that I was not calling the service correctly, it was an
easy fix.
Best regards,
zdrakec
Robert wrote:
Hi If anybody has an answer to this please mail me as well as I am having the excact same issue. deswardtr@xxxxxxxxxx
especially since this code worked a few months ago.
Hello all:
I have a Windows service that I am trying to access via a remote
client. The code in the service's OnStart event handler:
Dim provider As New
System.Runtime.Remoting.Channels.BinaryServerFormatterSinkProvider
provider.TypeFilterLevel =
Runtime.Serialization.Formatters.TypeFilterLevel.Full
Dim props As New Hashtable
props("port") = 10000
Dim channel As New TcpChannel(props, Nothing, provider)
ChannelServices.RegisterChannel(channel)
RemotingConfiguration.ApplicationName = "ProcessService"
RemotingConfiguration.RegisterWellKnownServiceType(GetType(ServiceClass),
"ServiceClass", WellKnownObjectMode.Singleton)
The client code intended to access this:
Dim provider As New
System.Runtime.Remoting.Channels.BinaryServerFormatterSinkProvider
provider.TypeFilterLevel =
Runtime.Serialization.Formatters.TypeFilterLevel.Full
Dim clientProv As New
System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider
Dim props As New Hashtable
props("port") = 0
props("name") = String.Empty
Dim channel As New TcpChannel(props, clientProv, provider)
Try
ChannelServices.RegisterChannel(channel)
Catch ex As Exception
Throw New Exception(String.Format("InvokeServer.RegisterChannel:
{0}", ex.Message))
End Try
Dim url As String = "tcp://" & ServerName & ":10000/Program
Files/processing/ServiceClass"
Dim svcClass As ServiceClass =
DirectCast(Activator.GetObject(GetType(ServiceClass),
url),ServiceClass)
At this point, a check of RemotingServices.IsTransparentProxy(svcClass)
returns True. However, any attempt to access a method of svcClass
results in the exception, "Requested Service not found".
There are no configuration files associated with this, and I've
researched and tinkered...can someone tell me what it is I'm not
seeing? I had a version of this working very well a few months ago.
Many thanks,
zdrakec
___
Newsgroups brought to you courtesy of www.dotnetjohn.com
.
- References:
- Requested Service Not Found is killing me...
- From: Robert
- Requested Service Not Found is killing me...
- Prev by Date: Requested Service Not Found is killing me...
- Next by Date: .NET Remoting, Windows Service host, load balancing
- Previous by thread: Requested Service Not Found is killing me...
- Next by thread: .NET Remoting, Windows Service host, load balancing
- Index(es):
Relevant Pages
|
Loading