[Mono-bugs] [Bug 550676] RemotingConfiguration Configure

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Oct 29 02:02:44 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=550676

User geni_ at yahoo.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=550676#c6





--- Comment #6 from Ivo Nikolov <geni_ at yahoo.com>  2009-10-29 00:02:43 MDT ---
DBService is Service that create server object by interface when cleint
requared server object. Object is created in time by Activator.GetObject. But
berofe we create object we need register that by
RemotingConfiguration.RegisterWellKnownClientType that is made by .configure
file with RemotingConfiguration.Configure. In .configure file we may set that
chahel is HTTP and formater is binary. Last need this code:

BinaryClientFormatterSinkProvider clnt = new
BinaryClientFormatterSinkProvider();

            HttpChannel channel = new HttpChannel(null, clnt, null);



            ChannelServices.RegisterChannel(channel);

            WellKnownClientTypeEntry myWellKnownClientTypeEntry =

                           new
WellKnownClientTypeEntry(typeof(GSLibrary.IDbServiceFactory),
"http://192.168.0.250:6630/DBServiceFactory");

            myWellKnownClientTypeEntry.ApplicationUrl
="http://192.168.0.250:6630/DBServiceFactory";

           
RemotingConfiguration.RegisterWellKnownClientType(myWellKnownClientTypeEntry);

or  by this in configure file :

 <system.runtime.remoting>

    <application name="GSClient">

      <client>

        <wellknown type="DBService.IDbServiceFactory, DBService"
url="http://192.168.0.250:6630/DBServiceFactory" />

      </client>

      <channels>

        <channel ref="http" port="0">

          <clientProviders>

            <formatter ref="binary"/>

          </clientProviders>

        </channel>

      </channels>

    </application>

  </system.runtime.remoting>

the diference is that first case requare compilation every time when data has
changed and second NOT !

Registration of remote object not require description of object and description
is not present in test example.

Thanks.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list