-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: Nasha
Message 6 in Discussion




  
    
    New Message on MumbaiUserGroup
  
  





      Article : .NET Remoting  ( Part - 5 -> Configuration File )

    
  
    
      Reply

          
            
                
               
                  Reply to Sender
                    Recommend
                  
                  Message 3 in Discussion
                                                
            
          
        
                    
        
            
              From: 
              Nasha
            
            
              

              


  
    
    New Message on MumbaiUserGroup
  
  





      Article : .NET Remoting  ( Part - 5 -> Configuration File )

    
  
    
      Reply

          
            
                
               
                  Reply to Sender
                    Recommend
                  
                  Message 1 in Discussion
                                                
            
          
        
                    
        
            
              From: 
              Nasha
            
            
              

               
Hi Frndz, 
Configuration files have always been a part of our applications. They generally 
hold data which is configurable, so instead of hard  coding the parameters in 
the code we can read them form a config file. In .NET Remtoing we have some xml 
elements to configure our channel and remote objects.

All the elements are placed under the main xml element <configuration>. For 
.Net Remoting there is a tag named  <system.runtime.remoting>. Let us look at 
the various elements provided for .NET Remoting which will be placed under  
<system.runtime.remoting> .

a. The first tag to come under <system.runtime.remoting> is <application> 
application. This tag is used to specify the application  name. On the server 
side for specifying  the server name and on the client side its the name of the 
client application.
E.g. If we have a remote server name "MyRemoteServer" then the server 
configuration will specify it in the application tag as follows
        <application name ="MyRemoteServer" >
                |
                |
        <application/>

b.On the server side we have <service> element. This element is used to specify 
a collection of remote objects we host. This element  can hold <wellknown> and 
<activated> elements under it , which are used to specify the type of remote 
object.
        <service>
           |
           |
        </service>
c.On the client side instead of service we have a <client> element. <client> 
has an attribute url to hold the path of the remote server.  Like <service> it 
can have <wellknown> and <activated> sub-elements under it. They are used to 
specify the type of remote object  and hold the url of the remote server.
E.g.
        <client url ="tcp://MyMacName:6789/MyRemoteServer>
                |
                |
        </client>
       
d <wellknown> is used on the server and client to specify the type of remote 
object On the server side it is used to specify the mode  of the remote object 
using the mode attribute, type of remote is specified as Namespace.Classname  
followed by the name of  assembly. ObjectURI mentions the server object's URI. 
Its a subelement under <service>.
On the client side it is used to mention the type again as Namespace.Classname 
and url holds the complete url of the server object  mentioning the protocol, 
port, application name and the object URI. Its a subelement under <client>
E.g.
        Client : - <wellknown type = "MyNamspace,MyRemoteServer" url = 
"protocol://MyMacName:6789/MyRemoteServer/URI" />
        Server :- <wellknown mode = "Singleton" type 
"MyNameSpace.MyRemoteServer, RemoteServer" objectURI="URI" />

e. The activated element is used for  client activated objects [CAO]. It 
specifies type containing the complete name of the object i.e.  
Namespace.ServerName along with the name of the assembly. This should be 
specified for CAO's on both server side and client side.
Its a subelement of <clilent> on client side  and <service> on server side.

E.g.
        <activated type = "MyNamespace.MyRemoteServer, RemoteServer" />

f. Generally it is observed that the config file are used to configure 
channels. To specify channel we have the channel element. Under  channel we 
have channeltype. It is used on both the client and server side. The 
channeltype element holds the type of channel with its  assembly name and the 
port number. Its a subelement under <appplication> generally mentioned below 
<service> or <client>.

E.g.
<channels>
        <channel type = 
"System.Runtime.Remoting.Channels.Http.HttpChannel,System.Runtime.Remoting" 
port=6789 />
        <channel type = 
"System.Runtime.Remoting.Channels.Tcp.TcpChannel,System.Runtime.Remoting" 
port=6789 />
</channels>  
-- Please post your queries and comments for my articles in the user group for 
the benefit of all. I hope this step from my end is helpful to all of us. You 
can find all articles written by me at my personal blog 
http://spaces.msn.com/members/nasha. 

Regards,

Namratha (Nasha)    
          
        
      
          
  

    View other groups in this category.
  

  

      



          
        
      
          
  

    View other groups in this category.
  

  

      




-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to