[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Amit

11/2/2004 12:24:00 PM

hi people

i am using CAO...
following is the code in the client:
TcpChannel channel = new TcpChannel()
ChannelServices.RegisterChannel(channel)

RemotingConfiguration.RegisterActivatedClientType
typeof(MyRemoteObject)
"tcp://localhost:1234/AppName")

however i am getting the following error:::::::::

Does anyone has sample where i can explore CAO :::::::

An unhandled exception of type 'System.Runtime.Remoting.RemotingException' occurred in mscorlib.dl

Additional information: Permission denied for activating type soap:MyRemoteObject, http://schemas.microsoft.com/clr/nsassem/Server/Server%2C%20Version%3D1.0.1767.28795%2C%20Culture%3Dneutral%2C%20PublicKeyTo...



---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/n...
4 Answers

Sam Santiago

11/2/2004 4:06:00 PM

0

Try some code like this on the client side:

Dim clientProv As BinaryClientFormatterSinkProvider
Dim serverProv As BinaryServerFormatterSinkProvider = New
BinaryServerFormatterSinkProvider
serverProv.TypeFilterLevel =
System.Runtime.Serialization.Formatters.TypeFilterLevel.Full
clientProv = New BinaryClientFormatterSinkProvider
Dim props As IDictionary = New Hashtable
props("port") = 0
Dim chan As TcpChannel = New TcpChannel(props, clientProv, serverProv)
ChannelServices.RegisterChannel(chan)

Also, check out this link for an example with CAOs:

Implementing Broker with .NET Remoting Using Client-Activated Objects
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpatterns/html/ImpBroker...

Thanks,

Sam

--
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTe...
_______________________________
"Amit" <amitmnagarwal@-NOSPAM-gmail.com> wrote in message
news:%23chHEbNwEHA.1524@TK2MSFTNGP09.phx.gbl...
> hi people
>
> i am using CAO....
> following is the code in the client:.
> TcpChannel channel = new TcpChannel();
> ChannelServices.RegisterChannel(channel);
>
> RemotingConfiguration.RegisterActivatedClientType(
> typeof(MyRemoteObject),
> "tcp://localhost:1234/AppName");
>
> however i am getting the following error::::::::::
>
> Does anyone has sample where i can explore CAO ::::::::
>
> An unhandled exception of type 'System.Runtime.Remoting.RemotingException'
occurred in mscorlib.dll
>
> Additional information: Permission denied for activating type
soap:MyRemoteObject,
http://schemas.microsoft.com/clr/nsassem/Server/Server%2C%20Version%3D1.0.1767.28795%2C%20Culture%3Dneutral%2C%20PublicKeyTo....
>
>
>
> ---
> Posted using Wimdows.net Newsgroups - http://www.wimdows.net/n...


Amit

11/3/2004 11:44:00 AM

0

thanks for ur reply ...

i tried that code

but still i am getting that error..

my client code is

BinaryClientFormatterSinkProvider clientProv
BinaryServerFormatterSinkProvider serverProv = new BinaryServerFormatterSinkProvider()
serverProv.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full
clientProv = new BinaryClientFormatterSinkProvider()

Hashtable props = new Hashtable()
props["port"] = 0

TcpChannel channel = new TcpChannel(props,clientProv, serverProv)
ChannelServices.RegisterChannel(channel)


RemotingConfiguration.RegisterActivatedClientType
typeof(MySingletonFactory)
"tcp://localhost:1234/CAO_PacLife_App")

AND SERVER CODE IS

TcpChannel chnl = new TcpChannel(1234)
ChannelServices.RegisterChannel(chnl)

//For CAO. Begi
RemotingConfiguration.ApplicationName = "CAO_PacLife_App"
RemotingConfiguration.RegisterActivatedServiceType(typeof(MySingletonFactory));

---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/n...

Sam Santiago

11/3/2004 2:03:00 PM

0

The concepts that apply to the client side also apply to the server side, so
just apply them.

--
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTe...
_______________________________
"Amit" <amitmnagarwal@-NOSPAM-gmail.com> wrote in message
news:uVWHzpZwEHA.2192@TK2MSFTNGP14.phx.gbl...
> thanks for ur reply ....
>
> i tried that code
>
> but still i am getting that error...
>
> my client code is :
>
> BinaryClientFormatterSinkProvider clientProv;
> BinaryServerFormatterSinkProvider serverProv = new
BinaryServerFormatterSinkProvider();
> serverProv.TypeFilterLevel =
System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
> clientProv = new BinaryClientFormatterSinkProvider();
>
> Hashtable props = new Hashtable();
> props["port"] = 0;
>
> TcpChannel channel = new TcpChannel(props,clientProv, serverProv);
> ChannelServices.RegisterChannel(channel);
>
>
> RemotingConfiguration.RegisterActivatedClientType(
> typeof(MySingletonFactory),
> "tcp://localhost:1234/CAO_PacLife_App");
>
> AND SERVER CODE IS:
>
> TcpChannel chnl = new TcpChannel(1234);
> ChannelServices.RegisterChannel(chnl);
>
> //For CAO. Begin
> RemotingConfiguration.ApplicationName = "CAO_PacLife_App";
>
RemotingConfiguration.RegisterActivatedServiceType(typeof(MySingletonFactory
));
>
> ---
> Posted using Wimdows.net Newsgroups - http://www.wimdows.net/n...


Amit

11/4/2004 10:18:00 AM

0

actually there is bug in 1.1 framework
it got solved my downloading the patch from sit



---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/n...