Re: Re-configuring remoting from config file during application session
From: SA (informatica_at_freemail.nl)
Date: 01/04/05
- Next message: SA: "Re: Two windows apps to talk to each other"
- Previous message: SA: "Re: Re-configuring remoting from config file during application session"
- Maybe in reply to: SA: "Re: Re-configuring remoting from config file during application session"
- Next in thread: Ken Kolda: "Re: Re-configuring remoting from config file during application session"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 4 Jan 2005 13:55:43 -0600
Michel:
Bedankt ;o)
I'll have to do something similar I guess...
The other issue I am having is that, ideally, I would be able to connect to
two different servers remoting the same object type, at the same time...
My app supports SOAP over TCP and SOAP over HTTP and binary RPC, all at the
same time, etc.
--
---
Sven.
"M.Posseth" <michelp@nohausystems.nl> wrote in message
news:uXsVgoX7EHA.3596@TK2MSFTNGP12.phx.gbl...
>
>
>
> Well i encountered a simular problem when i didn`t knew exactly what the
> server `s ip / name or port is
>
> as my program is beeing shipped to customers i do not know how and on wich
> computer the server is configured
>
> so instead of the need to change the config file and restart the app every
> time , i came up with this solution
>
> VB.NET Code ::::::::
> Private Sub frmMain_Load(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
>
> System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(New
> System.Runtime.Remoting.Channels.Tcp.TcpChannel)
>
> End Sub
>
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
>
> Try
>
> cRemote = CType(Activator.GetObject(Type.GetType("RemotingSample.NHSBL,
> RemoteBL"), "tcp://" & TextBox1.Text & ":" &
NumericUpDown.Value.ToString()
> & "/NHSBL"), RemotingSample.NHSBL)
>
> cRemote.NewClient()
>
> Catch ex As Exception
>
> Label2.Text = "Could not connect to the service ! " & vbCrLf & "are you
sure
> the service is running ? "
>
> Label2.Visible = True
>
> Beep()
>
> Exit Sub
>
> End Try
>
> blnConnected = True
>
> End Sub
>
>
> in textbox1 the user can enter the ip or servername and try to connect to
> the service
>
>
> i am currently bussy to find a way that i can do a broadcast on the
network
> to discover the availlable running servers so the user can make a
selection
> in a drop down list ( see my previous post ) however it seems i am
> inventing the weel ( again ??? )
>
>
>
> Met vriendelijke groet
> Kind regards,
>
> Michel Posseth
> Software Developer
> Microsoft Certified Professional
>
> Company : Nohau Systems B.V.
> Division : Systems Development
>
> "SA" <informatica@freemail.nl> wrote in message
> news:%23Nj68oP7EHA.2196@TK2MSFTNGP11.phx.gbl...
> > Hi all,
> >
> > I am fairly new to remoting.
> >
> > I have successfully set up a remoting Winforms client that communicates
> over
> > TCP (binary) with a Windows Service.
> >
> > The nature of the project is such that we may have to communicate with 2
> or
> > more services. The URIs are provided to the program by the user, but the
> > channel and formatter info is in the config file.
> >
> > Adding the first URI is not a problem: I read the config file and then
> > create the object using System.Activator.GetObject. However, for the
> second
> > URI, when I read the config file, I get an error message stating that
the
> > application name has already been set.
> >
> > The easy solution seems to me to check whether remoting has already been
> > configured, but I can't find out how to do that.
> >
> > Any help is appreciated.
> >
> > ---
> >
> > Sven.
> >
> >
>
>
- Next message: SA: "Re: Two windows apps to talk to each other"
- Previous message: SA: "Re: Re-configuring remoting from config file during application session"
- Maybe in reply to: SA: "Re: Re-configuring remoting from config file during application session"
- Next in thread: Ken Kolda: "Re: Re-configuring remoting from config file during application session"
- Messages sorted by: [ date ] [ thread ]