Remoting parameters with config file
how can we specify remoting parameters with the help config files?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Lalit MPosted Sep 28, 2011, 5:56 AM
Code sample here
----------------------
type="Server.ClsServer, Server"
objectUri="RemoteObject" />
Read more
if help kindly check my answer in check box
Thanks Advance ..
Prasant JinagaPosted Sep 28, 2011, 5:49 AM
Both remoting server and remoting client parameters can be provided through config
files.Below is a sample of server config file which provides all remoting parameter values
which we where providing through code.
type="Server.ClsServer, Server"
objectUri="RemoteObject" />
Later this config file can be loaded using the following code.
RemotingConfiguration.Configure(AppDomain.CurrentDomain.SetupInformation.ApplicationBase
& "Server.config")
Same way we also have client.config file for loading the client remoting parameters.
url = "tcp://localhost:9000/Server/RemoteObject"/>
client remoting can then load the configuration file by using :-
Dim IobjCommon As CommonInterFace.Icommon
Dim StrData As String
Dim objServiceEntries As WellKnownClientTypeEntry()
RemotingConfiguration.Configure(AppDomain.CurrentDomain.SetupInformation.ApplicationBase
& "Client.config")
objServiceEntries =
RemotingConfiguration.GetRegisteredWellKnownClientTypes()
IobjCommon = Activator.GetObject(GetType(Icommon),
objServiceEntries(0).ObjectUrl.ToString())
StrData = IobjCommon.GetValue()
Console.WriteLine(" Serve side Data is " & StrData)
Console.ReadLine()
For more Info Refer the below link.
http://www.dotnetspider.com/forum/102213-How-can-you-specify-remoting-parameters-using-Config-files.aspx
Thanks,
Prasant