Re: Requested Service Not Found is killing me...



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

.



Relevant Pages

  • Re: MAC Address
    ... Also, note that it is easy to read the MAC addresses on the computer on which the code resides, but the server cannot read the MAC address of the client unless there is a program that reads this information on the client and passes it to the server. ... Dim pWinStationName As String ' integer LPTSTR - Pointer to a null-terminated string containing the name of the WinStation for this session ... ByVal SessionId As Int32, ByVal WTSInfoClass As Int32, ByRef ppBuffer As String, ByRef pCount As Int32) As Boolean ...
    (microsoft.public.windows.terminal_services)
  • Re: MAC Address
    ... Note that the IP address of the client is not reliable ... MAC addresses on the computer on which the code resides, but the server ... Dim SessionID As Int32 'DWORD integer ... ByVal SessionId As Int32, ByVal WTSInfoClass As Int32, ...
    (microsoft.public.windows.terminal_services)
  • Re: Using Visual Basic NET to Access Terminal Services Session and Client Information
    ... It also accesses the Client Information for the client which executes ... this program on a Terminal Services Server. ... Dim pWinStationName As String ' integer LPTSTR - Pointer to a null-terminated string containing the name of the WinStation for this session ... ByVal SessionId As Int32, ByVal WTSInfoClass As Int32, ByRef ppBuffer As String, ByRef pCount As Int32) As Boolean ...
    (microsoft.public.windows.terminal_services)
  • Re: Input box based upon a list
    ... Private Sub UserForm_Initialize ... Dim sourcedoc As Word.Document ... ' Open the file containing the client details ... ' Get the number of columns in the table of client details ...
    (microsoft.public.word.vba.userforms)
  • Using Visual Basic NET to Access Terminal Services Session and Client Information
    ... It also accesses the Client Information for the client which executes this program on a Terminal Services Server. ... Dim pWinStationName As String ' integer LPTSTR - Pointer to a null-terminated string containing the name of the WinStation for this session ...
    (microsoft.public.windows.terminal_services)

Loading