Click here to Skip to main content
15,917,580 members
Home / Discussions / C#
   

C#

 
GeneralRe: Session Probs..., Pin
Member 387988126-Oct-07 19:40
Member 387988126-Oct-07 19:40 
GeneralRe: Session Probs..., Pin
Paul Conrad27-Oct-07 12:27
professionalPaul Conrad27-Oct-07 12:27 
QuestionSaving back ground image of a form Pin
sindhutiwari25-Oct-07 22:07
sindhutiwari25-Oct-07 22:07 
AnswerRe: Saving back ground image of a form Pin
N a v a n e e t h25-Oct-07 22:22
N a v a n e e t h25-Oct-07 22:22 
AnswerRe: Saving back ground image of a form Pin
Mohib Sheth25-Oct-07 23:40
Mohib Sheth25-Oct-07 23:40 
QuestionHow to update databinding property Pin
El'Cachubrey25-Oct-07 21:48
El'Cachubrey25-Oct-07 21:48 
QuestionProblem in uplod File through proxy to FTP Pin
pritesh_patel25-Oct-07 21:35
pritesh_patel25-Oct-07 21:35 
Question.Net remoting, registering two channel? how??? Pin
Ponzano Paolo25-Oct-07 21:14
Ponzano Paolo25-Oct-07 21:14 
Hello,
I've got an application that needs to create 2 remote object (CAO type), I init them into businness logic level:

<br />
private void InitNetRemotingProxy()<br />
    {<br />
      myDataProxyAccess = new ProxyDataAccess(idCup, idSeason, idMatchCode);<br />
      myDataProxyAccess.InitNetRemotingClient("Normal");<br />
<br />
      myDataProxyAccessForLev1 = new ProxyDataAccess(idCup, idSeason, idMatchCode);<br />
      myDataProxyAccess.InitNetRemotingClient("Lev1");<br />
    }<br />


and here's where the init is done

 <br />
public void InitNetRemotingClient(string type)<br />
{<br />
  string remotingConnection = system.Configuration.ConfigurationManager.AppSettings["serverAddress"];<br />
      string tcpPort = (type!="Lev1") ? System.Configuration.ConfigurationManager.AppSettings["tcpPort"] : System.Configuration.ConfigurationManager.AppSettings["tcpPortLev1Stat"];<br />
<br />
      string requestService = (type != "Lev1")<br />
                                ? System.Configuration.ConfigurationManager.AppSettings["requestServiceName"]<br />
                                : System.Configuration.ConfigurationManager.AppSettings["requestServiceName2"];<br />
      string sb = String.Format("tcp://{0}:{1}/{2}", remotingConnection, tcpPort, requestService);<br />
<br />
      <br />
      try<br />
      {<br />
RemotingConfiguration.IsRemotelyActivatedClientType(typeof(DBHelper));<br />
<br />
        IChannel ic = new TcpChannel(Convert.ToInt32(tcpPort));<br />
        int i = 0;<br />
<br />
        ChannelServices.RegisterChannel(ic, false);<br />
          RemotingConfiguration.RegisterActivatedClientType(typeof(DBHelper), sb);<br />
<br />
        myDBHelper = new DBHelper(idCup, idSeason, idMatchCode);<br />
      }


on the second call, the one myDataProxyAccess.InitNetRemotingClient("Lev1"); I get an exception at ChannelServices.RegisterChannel(ic, false);, the exception is : Message = "The channel 'tcp' is already registered.".

It's not possible to create 2 channel? Where I do wrong? The tcpport and requestServiceName are different for the two calls.
Please help me, thanks

Bests

Paolo Ponzano
AnswerRe: .Net remoting, registering two channel? how??? Pin
Ponzano Paolo25-Oct-07 22:07
Ponzano Paolo25-Oct-07 22:07 
QuestionResticting the files to opening by using WindowsService application [modified] Pin
Roney25-Oct-07 20:23
Roney25-Oct-07 20:23 
Questionportability of user control : x64 platform Pin
Nadia Monalisa25-Oct-07 20:01
Nadia Monalisa25-Oct-07 20:01 
AnswerRe: portability of user control : x64 platform Pin
N a v a n e e t h25-Oct-07 20:13
N a v a n e e t h25-Oct-07 20:13 
GeneralRe: portability of user control : x64 platform Pin
Nadia Monalisa25-Oct-07 22:34
Nadia Monalisa25-Oct-07 22:34 
GeneralRe: portability of user control : x64 platform Pin
N a v a n e e t h25-Oct-07 22:51
N a v a n e e t h25-Oct-07 22:51 
QuestionHelpRequested event Pin
Hans Ruck25-Oct-07 19:41
Hans Ruck25-Oct-07 19:41 
AnswerRe: HelpRequested event Pin
N a v a n e e t h25-Oct-07 20:22
N a v a n e e t h25-Oct-07 20:22 
GeneralRe: HelpRequested event Pin
Hans Ruck25-Oct-07 20:31
Hans Ruck25-Oct-07 20:31 
GeneralRe: HelpRequested event Pin
N a v a n e e t h25-Oct-07 20:37
N a v a n e e t h25-Oct-07 20:37 
GeneralRe: HelpRequested event Pin
Hans Ruck25-Oct-07 20:44
Hans Ruck25-Oct-07 20:44 
GeneralRe: HelpRequested event Pin
N a v a n e e t h25-Oct-07 20:46
N a v a n e e t h25-Oct-07 20:46 
GeneralRe: HelpRequested event Pin
Hans Ruck25-Oct-07 20:56
Hans Ruck25-Oct-07 20:56 
GeneralRe: HelpRequested event Pin
N a v a n e e t h25-Oct-07 21:16
N a v a n e e t h25-Oct-07 21:16 
GeneralRe: HelpRequested event Pin
Hans Ruck25-Oct-07 21:25
Hans Ruck25-Oct-07 21:25 
QuestionCalculate the TotalMonths difference between two DateTime Pin
Patrick Klug25-Oct-07 17:43
Patrick Klug25-Oct-07 17:43 
AnswerRe: Calculate the TotalMonths difference between two DateTime Pin
darkelv25-Oct-07 17:56
darkelv25-Oct-07 17:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.