Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How can you specify remoting parameters using Config files
How can you specify remoting parameters using Config files ?
✍: Guest
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.
<configuration> <system.runtime.remoting> <application name=”Server”> <service> <wellknown mode=”SingleCall” type=”Server.ClsServer, Server” objectUri=”RemoteObject” /> </service> <channels> <channel ref=”tcp server” port=”9000" /> </channels> </application> </system.runtime.remoting> </configuration>
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.
<configuration> <system.runtime.remoting> <application name=”Client”> <client url=”tcp://localhost:9000/RemoteObject”> <wellknown type=”CommonInterface.Icommon, Icommon” url = “tcp://localhost:9000/Server/RemoteObject”/> </client> <channels> <channel ref=”tcp client” /> </channels> </application> </system.runtime.remoting> </configuration> 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()
2007-10-23, 5391👍, 0💬
Popular Posts:
Can you explain the fundamentals of “GetGlobalResourceObject ”and “GetLocalResourceObject” function...
Can one change the mouse pointer in Forms? The SET_APPLICATION_PROPERTY build-in in Oracle Forms all...
How Many Types of Tables Supported by Oracle? - Oracle DBA FAQ - Managing Oracle Database Tables Ora...
How do I use a scriptlet to initialize a newly instantiated bean? A jsp:useBean action may optionall...
What are the two fundamental objects in ADO.NET ? Datareader and Dataset are the two fundamental obj...