error when calling remote component in Web Service

Discussion in 'ASP .Net Web Services' started by keith, Oct 30, 2008.

  1. keith

    keith Guest

    I have a remote component hosted in console server and have a web service.

    Inside the web service, I have codes to configure the component

    System.Runtime.Remoting.RemotingConfiguration.Configure(filename)
    IComponent iCom = (IComponent)Activator.GetObject(typeof(Component),
    "tcp://localhost:1234/Component.rem");
    iCom.Hello();

    I have a test app (all these projects are in same solution) that calls a
    method in the WS. Then it calls a function in the
    remote component. When running it the first time. It worked just fine.
    But when running it thereafter, it throw


    "System.Runtime.Remoting.RemotingException: Remoting configuration failed
    with the exception 'System.Runtime.Remoting.RemotingException: Attempt to
    redirect activation of type 'Test.IComponent,TestInterface' which is already
    redirected.\r\n at
    System.Runtime.Remoting.RemotingConfigHandler.RemotingConfigInfo.AddWellKnownClientType(WellKnownClientTypeEntry
    entry)\r\n at
    System.Runtime.Remoting.RemotingConfigHandler.RegisterWellKnownClientType(WellKnownClientTypeEntry
    entry)\r\n at
    System.Runtime.Remoting.RemotingConfiguration.RegisterWellKnownClientType(WellKnownClientTypeEntry
    entry)\r\n at
    System.Runtime.Remoting.RemotingConfigHandler.RemotingConfigInfo.StoreRemoteAppEntries(RemotingXmlConfigFileData
    configData)\r\n at
    System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData
    configData, Boolean ensureSecurity)'.\r\n at
    System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData
    , Boolean ensureSecurity)\r\n at
    System.Runtime.Remoting.RemotingConfigHandler.DoConfiguration(String
    filename, Boolean ensureSecurity)\r\n at
    System.Runtime.Remoting.RemotingConfiguration.Configure(String filename,
    Boolean ensureSecurity)\r\n at
    JINDEXMessagingService.DoRemoteProcess(JINDEXDocument jDoc) in
    c:\\Inetpub\\wwwroot\\WS1\\App_Code\\Test.cs:line 103"



    Can you help?

    Thanks

    Keith
    keith, Oct 30, 2008
    #1
    1. Advertising

  2. "keith" <> wrote in message
    news:...
    > I have a remote component hosted in console server and have a web service.
    >
    > Inside the web service, I have codes to configure the component
    >
    > System.Runtime.Remoting.RemotingConfiguration.Configure(filename)
    > IComponent iCom = (IComponent)Activator.GetObject(typeof(Component),
    > "tcp://localhost:1234/Component.rem");
    > iCom.Hello();
    >
    > I have a test app (all these projects are in same solution) that calls a
    > method in the WS. Then it calls a function in the
    > remote component. When running it the first time. It worked just fine.
    > But when running it thereafter, it throw
    >
    >
    > "System.Runtime.Remoting.RemotingException: Remoting configuration failed
    > with the exception 'System.Runtime.Remoting.RemotingException: Attempt to
    > redirect activation of type 'Test.IComponent,TestInterface' which is
    > already
    > redirected.\r\n at


    Did you not understand "Attempt to redirect activation of type
    'Test.IComponent,TestInterface' which is already redirected"? Did you
    notice which line it failed on?
    --
    John Saunders | MVP - Connected System Developer
    John Saunders, Oct 30, 2008
    #2
    1. Advertising

  3. keith

    keith Guest

    I know what happened and solution. It will config multiple times in a web app
    or web service which is not allowed.

    keith

    "John Saunders" wrote:

    > "keith" <> wrote in message
    > news:...
    > > I have a remote component hosted in console server and have a web service.
    > >
    > > Inside the web service, I have codes to configure the component
    > >
    > > System.Runtime.Remoting.RemotingConfiguration.Configure(filename)
    > > IComponent iCom = (IComponent)Activator.GetObject(typeof(Component),
    > > "tcp://localhost:1234/Component.rem");
    > > iCom.Hello();
    > >
    > > I have a test app (all these projects are in same solution) that calls a
    > > method in the WS. Then it calls a function in the
    > > remote component. When running it the first time. It worked just fine.
    > > But when running it thereafter, it throw
    > >
    > >
    > > "System.Runtime.Remoting.RemotingException: Remoting configuration failed
    > > with the exception 'System.Runtime.Remoting.RemotingException: Attempt to
    > > redirect activation of type 'Test.IComponent,TestInterface' which is
    > > already
    > > redirected.\r\n at

    >
    > Did you not understand "Attempt to redirect activation of type
    > 'Test.IComponent,TestInterface' which is already redirected"? Did you
    > notice which line it failed on?
    > --
    > John Saunders | MVP - Connected System Developer
    >
    >
    keith, Oct 30, 2008
    #3
  4. keith

    keith Guest

    John,

    Is it good to use remote component in a web service?

    Actually, what I want to save data to text file, but I got permission issues.
    Even though I set an account have full access on a folder and checked ACL on
    it, I still got

    Access to the path 'C:\\temp\txt' is denied

    when executing the codes in Web Service

    System.IO.Stream sm = new System.IO.FileStream(c:\temp\test.txt,
    System.IO.FIleMode.Create);


    Can you help?

    Thanks

    Keith




    "John Saunders" wrote:

    > "keith" <> wrote in message
    > news:...
    > > I have a remote component hosted in console server and have a web service.
    > >
    > > Inside the web service, I have codes to configure the component
    > >
    > > System.Runtime.Remoting.RemotingConfiguration.Configure(filename)
    > > IComponent iCom = (IComponent)Activator.GetObject(typeof(Component),
    > > "tcp://localhost:1234/Component.rem");
    > > iCom.Hello();
    > >
    > > I have a test app (all these projects are in same solution) that calls a
    > > method in the WS. Then it calls a function in the
    > > remote component. When running it the first time. It worked just fine.
    > > But when running it thereafter, it throw
    > >
    > >
    > > "System.Runtime.Remoting.RemotingException: Remoting configuration failed
    > > with the exception 'System.Runtime.Remoting.RemotingException: Attempt to
    > > redirect activation of type 'Test.IComponent,TestInterface' which is
    > > already
    > > redirected.\r\n at

    >
    > Did you not understand "Attempt to redirect activation of type
    > 'Test.IComponent,TestInterface' which is already redirected"? Did you
    > notice which line it failed on?
    > --
    > John Saunders | MVP - Connected System Developer
    >
    >
    keith, Oct 30, 2008
    #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. Soni
    Replies:
    0
    Views:
    1,073
  2. Karuppasamy

    com+ component and Component Service

    Karuppasamy, Jan 13, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    595
    Karuppasamy
    Jan 13, 2004
  3. Jim Hammond
    Replies:
    1
    Views:
    735
    Jim Hammond
    Nov 12, 2003
  4. dgleeson422111

    Consuming local web service - ok, remote web service -problem?

    dgleeson422111, Jan 26, 2010, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    894
    dgleeson422111
    Jan 26, 2010
  5. Eva Janakieff

    Serviced Component Calling a Web Service Problem

    Eva Janakieff, Apr 19, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    292
    Dino Chiesa [Microsoft]
    Apr 22, 2004
Loading...

Share This Page