Re: error when calling remote component in Web Service



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" <keith@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9CA9E569-6511-4F69-BF31-83E7C14EEED9@xxxxxxxxxxxxxxxx
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


.


Loading