Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > error when calling remote component in Web Service

Reply
Thread Tools

error when calling remote component in Web Service

 
 
keith
Guest
Posts: n/a
 
      10-30-2008
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.Conf igure(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.Remo tingConfigInfo.AddWellKnownClientType(WellKnownCli entTypeEntry
entry)\r\n at
System.Runtime.Remoting.RemotingConfigHandler.Regi sterWellKnownClientType(WellKnownClientTypeEntry
entry)\r\n at
System.Runtime.Remoting.RemotingConfiguration.Regi sterWellKnownClientType(WellKnownClientTypeEntry
entry)\r\n at
System.Runtime.Remoting.RemotingConfigHandler.Remo tingConfigInfo.StoreRemoteAppEntries(RemotingXmlCo nfigFileData
configData)\r\n at
System.Runtime.Remoting.RemotingConfigHandler.Conf igureRemoting(RemotingXmlConfigFileData
configData, Boolean ensureSecurity)'.\r\n at
System.Runtime.Remoting.RemotingConfigHandler.Conf igureRemoting(RemotingXmlConfigFileData configData
, Boolean ensureSecurity)\r\n at
System.Runtime.Remoting.RemotingConfigHandler.DoCo nfiguration(String
filename, Boolean ensureSecurity)\r\n at
System.Runtime.Remoting.RemotingConfiguration.Conf igure(String filename,
Boolean ensureSecurity)\r\n at
JINDEXMessagingService.DoRemoteProcess(JINDEXDocum ent jDoc) in
c:\\Inetpub\\wwwroot\\WS1\\App_Code\\Test.cs:line 103"



Can you help?

Thanks

Keith
 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      10-30-2008
"keith" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.Conf igure(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

 
Reply With Quote
 
 
 
 
keith
Guest
Posts: n/a
 
      10-30-2008
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.Conf igure(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
>
>

 
Reply With Quote
 
keith
Guest
Posts: n/a
 
      10-30-2008
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.Conf igure(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
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Consuming local web service - ok, remote web service -problem? dgleeson422111 ASP .Net Web Controls 0 01-26-2010 11:17 AM
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
Serviced Component Calling a Web Service Problem Eva Janakieff ASP .Net Web Services 1 04-22-2004 04:01 PM
using client-side component keeps calling component's init Jim Hammond ASP .Net 1 11-12-2003 08:13 PM
Re: Calling a .NET component from a COM component remotely Soni ASP .Net 0 07-25-2003 04:33 AM



Advertisments