Need help from .NEt remote expert ??

Discussion in 'MCSD' started by =?Utf-8?B?c2VyZ2UgY2FsZGVyYXJh?=, Feb 2, 2006.

  1. Dear all

    In order to understand remoting, I have found a sample which is based on :

    A remote object named "BuisnessComponent" which collects data from an SQL
    server database which is handle as a service component as follow:

    =======>

    <Transaction(TransactionOption.RequiresNew), _
    ConstructionEnabled([Default]:="server=localhost;User=sa;Pwd=sa;
    database=FLIGHT"), _
    JustInTimeActivation(True)> _

    <=======

    Then I have a "Remote Access Component" which refer to "Buisnes Component"
    which is host in a windows service. IN the OnStart routine of my service
    following code is executed:

    ====>
    ChannelServices.RegisterChannel(new TCPChanel)
    RemotingConfiguration.ApplicationName = "Remote Flight System Access
    RemotingConfiguration.RegisterWellKnownServiceType(GetType(RemoteAccessComponents.FlightBookings), "RemoteDataAccessServer", WellKnownObjectMode.Singleton)
    <====

    If i try to runit locally , it fails
    Then I try to run it really physically remote. for that I have install
    the remote object library into my server GAG, then install the host service
    and start the service on the Server. I can then see in my Server component
    list my Buisness Component application

    Then from my local PC , I simply start my Client.exe application but it fails
    I guess it cannot acces or find the remote server

    Where to check ?
    Does the installation procedure I have made is correct ?

    I could not get any straight forward, sample which is fully working.
    The one I get is from MS press book, XML web service and server component
    but still not working

    Thnaks for your help
    regards
    serge
    =?Utf-8?B?c2VyZ2UgY2FsZGVyYXJh?=, Feb 2, 2006
    #1
    1. Advertising

  2. Hello Serge

    I think this example is from the MS Press self-paced book chapter 5. I'm
    also having trouble with it.

    First, it didn't compile. I had to add a couple of "namespace XXXX {...}"
    that were absent in the original code.

    Second, I had another problem saying that it could not find the remote
    object. I changed "GetType" to "typeof". And then RemoteAccessAgent started
    correctly.

    But now whenever I start the RemoteClient I get the following error in the
    event log (this is where you should look for error messages):

    "The following component is configured for Construction, and either the
    IObjectConstruct:Construct() method failed , or the component does not
    support IObjectConstruct."

    Any one else having problems with this lab?



    "serge calderara" wrote:

    > Dear all
    >
    > In order to understand remoting, I have found a sample which is based on :
    >
    > A remote object named "BuisnessComponent" which collects data from an SQL
    > server database which is handle as a service component as follow:
    >
    > =======>
    >
    > <Transaction(TransactionOption.RequiresNew), _
    > ConstructionEnabled([Default]:="server=localhost;User=sa;Pwd=sa;
    > database=FLIGHT"), _
    > JustInTimeActivation(True)> _
    >
    > <=======
    >
    > Then I have a "Remote Access Component" which refer to "Buisnes Component"
    > which is host in a windows service. IN the OnStart routine of my service
    > following code is executed:
    >
    > ====>
    > ChannelServices.RegisterChannel(new TCPChanel)
    > RemotingConfiguration.ApplicationName = "Remote Flight System Access"
    > RemotingConfiguration.RegisterWellKnownServiceType(GetType(RemoteAccessComponents.FlightBookings), "RemoteDataAccessServer", WellKnownObjectMode.Singleton)
    > <====
    >
    > If i try to runit locally , it fails
    > Then I try to run it really physically remote. for that I have install
    > the remote object library into my server GAG, then install the host service
    > and start the service on the Server. I can then see in my Server component
    > list my Buisness Component application
    >
    > Then from my local PC , I simply start my Client.exe application but it fails
    > I guess it cannot acces or find the remote server
    >
    > Where to check ?
    > Does the installation procedure I have made is correct ?
    >
    > I could not get any straight forward, sample which is fully working.
    > The one I get is from MS press book, XML web service and server component
    > but still not working
    >
    > Thnaks for your help
    > regards
    > serge
    >
    =?Utf-8?B?Y2Jt?=, Feb 3, 2006
    #2
    1. Advertising

  3. Yes you are right, it comes from thsi book.
    And I am uinsg th VB syntax and I have to add also missing name space, and
    gettype as you mention .. After this it compile and I am able to run the
    server part and start the service correctly.

    But as soon as I start the Client.exe which is suppose to get at a certain
    stpep a reference to the server component, it fails with "Cannot get remote
    server, internal error"

    I will really appreciate that at least example provide in this book that are
    suppose to teach at least have running samples. In all the remoting section
    and Server compoenent of that books, none of labs provides are working.

    If any specialist could help us to identify why then it will be a good
    thing, and good practice also.

    thnaks for your help
    serge

    "cbm" wrote:

    > Hello Serge
    >
    > I think this example is from the MS Press self-paced book chapter 5. I'm
    > also having trouble with it.
    >
    > First, it didn't compile. I had to add a couple of "namespace XXXX {...}"
    > that were absent in the original code.
    >
    > Second, I had another problem saying that it could not find the remote
    > object. I changed "GetType" to "typeof". And then RemoteAccessAgent started
    > correctly.
    >
    > But now whenever I start the RemoteClient I get the following error in the
    > event log (this is where you should look for error messages):
    >
    > "The following component is configured for Construction, and either the
    > IObjectConstruct:Construct() method failed , or the component does not
    > support IObjectConstruct."
    >
    > Any one else having problems with this lab?
    >
    >
    >
    > "serge calderara" wrote:
    >
    > > Dear all
    > >
    > > In order to understand remoting, I have found a sample which is based on :
    > >
    > > A remote object named "BuisnessComponent" which collects data from an SQL
    > > server database which is handle as a service component as follow:
    > >
    > > =======>
    > >
    > > <Transaction(TransactionOption.RequiresNew), _
    > > ConstructionEnabled([Default]:="server=localhost;User=sa;Pwd=sa;
    > > database=FLIGHT"), _
    > > JustInTimeActivation(True)> _
    > >
    > > <=======
    > >
    > > Then I have a "Remote Access Component" which refer to "Buisnes Component"
    > > which is host in a windows service. IN the OnStart routine of my service
    > > following code is executed:
    > >
    > > ====>
    > > ChannelServices.RegisterChannel(new TCPChanel)
    > > RemotingConfiguration.ApplicationName = "Remote Flight System Access"
    > > RemotingConfiguration.RegisterWellKnownServiceType(GetType(RemoteAccessComponents.FlightBookings), "RemoteDataAccessServer", WellKnownObjectMode.Singleton)
    > > <====
    > >
    > > If i try to runit locally , it fails
    > > Then I try to run it really physically remote. for that I have install
    > > the remote object library into my server GAG, then install the host service
    > > and start the service on the Server. I can then see in my Server component
    > > list my Buisness Component application
    > >
    > > Then from my local PC , I simply start my Client.exe application but it fails
    > > I guess it cannot acces or find the remote server
    > >
    > > Where to check ?
    > > Does the installation procedure I have made is correct ?
    > >
    > > I could not get any straight forward, sample which is fully working.
    > > The one I get is from MS press book, XML web service and server component
    > > but still not working
    > >
    > > Thnaks for your help
    > > regards
    > > serge
    > >
    =?Utf-8?B?c2VyZ2UgY2FsZGVyYXJh?=, Feb 10, 2006
    #3
  4. =?Utf-8?B?c2VyZ2UgY2FsZGVyYXJh?=

    haff

    Joined:
    Aug 12, 2006
    Messages:
    1
    Corrections.

    Developing XML Web Service and Server Components with Visual Basic. NET and Visual Studio C#.NET
    The Errors in Chapter 5 Lab. that I have found:

    I got the same errors as descriped in the previous threads.

    page. 290:
    ...
    private void initialize()
    {
    connection = new SwlConnection(connectionstring);
    DataAdapter = new SqlDataAdapter(select * from Flights",connectionstring);

    page 292:
    ...
    private void initialize()
    {
    connection = new SwlConnection(connectionstring);
    DataAdapter = new SqlDataAdapter(select * from Bookings",connectionstring);

    page 298:
    ...
    RemotingConfiguration.RegisterWellKnownServiceType(typeof(FlightBookings), "RemoteDataAccessServer", WellKnownObjectMode.Singleton);


    Then it worked.
    haff, Aug 12, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Sale
    Replies:
    1
    Views:
    11,927
    Robin Walker
    Dec 11, 2004
  2. mlsteen1
    Replies:
    3
    Views:
    638
    =?Utf-8?B?QWxiaW9ud29vZHM=?=
    Mar 28, 2006
  3. Twitch
    Replies:
    6
    Views:
    485
    ┬░Mike┬░
    Dec 30, 2003
  4. Marc Abrahams

    I need help from an expert!

    Marc Abrahams, Oct 30, 2003, in forum: Computer Information
    Replies:
    3
    Views:
    420
    Marc Abrahams
    Nov 18, 2003
  5. niljaviya
    Replies:
    0
    Views:
    666
    niljaviya
    Nov 2, 2006
Loading...

Share This Page