4

I have the following code in my Web.Config in a remoting project which is having a reference to a dll of another class library. The class library has the following class inside it:

public class Generator: MarshalByRefObject, IGenerator
    {
}

When I run the remoting project for the configured uri which is exposing the above class, I get the mentioned error in the question header.

The url I run is this: http://localhost/documentgenerationserver/Generator.rem

<application>
      <service>
        <wellknown mode="SingleCall" objectUri="Generator.rem" type="ABC.Generator, Generator" />
      </service>
      <channels>
        <channel ref="http" />
        <serverProviders>
          <formatter ref="binary" typeFilterLevel="Full" />
        </serverProviders>
      </channels>
    </application>

Can someone advise me, how to resolve this issue?

EDIT 1: After going through an article on remoting on google, I tried appending ?wsdl to my URL above and it worked. It shows me WSDL file for my remote object. In my Client Project which is an asp.net web application hosted in IIS 7.5, when I instantiate the remote object using following:

Activator.GetObject()

It successfully instantiates, but when I use this proxy of remote to call its method, it does not reach up to that method and returns immediately.

Can some one please help me knowing, how can I at least debug it and see, what's happening. Why it is not reaching to the remote object method?

teenup
  • 7,459
  • 13
  • 63
  • 122
  • Slightly related note - remoting was deprecated quite awhile ago in favor of WCF. It's not really suitable for new development. http://stackoverflow.com/questions/1294494/is-net-remoting-really-deprecated – 3Dave Apr 12 '13 at 10:56
  • But what about the previous project that was written 5-10 years back and someone is working on it and struggling with it. I needed some help here. – teenup Apr 12 '13 at 11:02
  • I said for *new* development. – 3Dave Apr 12 '13 at 11:04
  • Please show the *full* code you use to successfully connect with `Activator.GetObject()`. Also show the code you use when attempting to connect the other way. Finally, is this a Web application? If not, I would expect that configuration to be in App.config on the client side, not Web.config. – Jim Mischel Apr 12 '13 at 13:38

1 Answers1

-1

The message "System.Runtime.Remoting.RemotingException: Requested Service not found" is the expected behavior on the browser for a remoting service.

vijayst
  • 20,359
  • 18
  • 69
  • 113