CSLA 2.1 and Remoting

CSLA 2.1 and Remoting

Old forum URL: forums.lhotka.net/forums/t/1246.aspx


DeHaynes posted on Monday, September 18, 2006

   I am trying to get the PTracker example setup with the 2.1 framework.  Web Services seems fine but I cannot get remoting working.  I keep getting a "Input stream is not a valid binary format" error in RemotingProxy.cs. 

   The remoting webpage is setup as http://localhost:3187/RemotingHost/ but my app.config in PTWin is

<add key="CslaDataPortalProxy" 
   
value="Csla.DataPortalClient.RemotingProxy, Csla"/>

<add key="CslaDataPortalUrl" 
   
value="http://localhost/RemotingHostcs/RemotingPortal.rem"/>

Do I need need to make these the same?

RockfordLhotka replied on Monday, September 18, 2006

Certainly the URL in the client config file needs to match the URL of the server component.

skagen00 replied on Monday, September 18, 2006

I have to point out that it looks like in your config file it has your virtual directory as RemotingHostcs and the remoting webpage above you have as RemotingHost.

(i.e. one path has cs and one doesn't).

Perhaps that's your problem?

DeHaynes replied on Monday, September 18, 2006

Well I haven't done anything to this code except what it says in the BuildCsla.pdf file and to point the connection strings to the SQL server on my local machine. 

I just like to have a running example so I can use it as a reference.

I have gotten the "run local" and web services versions running.  As soon as I am done with Remoting then I MAY do the Enterprise Services version too.

DeHaynes replied on Monday, September 18, 2006

I found the issue. 

In order for me to get the Project Tracker example to work in CSLA 2.1 with remoting, I had to make some changes to the App.Config file on PTWin.  The original code is:

<add key="CslaDataPortalProxy" 
   
value="Csla.DataPortalClient.RemotingProxy, Csla"/>

<add key="CslaDataPortalUrl" 
   
value="http://localhost/RemotingHostcs/RemotingPortal.rem"/>

In order to get remoting to work, it should be:

<add key="CslaDataPortalProxy" 
   
value="Csla.DataPortalClient.RemotingProxy, Csla"/>

<add key="CslaDataPortalUrl" 
   
value="http://localhost:3187/RemotingHost/RemotingPortal.rem"/>

In the other config files remoting is configured like the later, so I think this is just a mistake.  Unless I am just missing something, you might want to correct this in the source code.

 

Copyright (c) Marimer LLC