Input String not in valid binary format

Input String not in valid binary format

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


Misled posted on Monday, July 03, 2006

My app works fine locally. The next step is to make it working using IIS on my development machine (app and IIS on same machine). When I try to do anything with remoting I get "Input String not in valid binary format". Here is the relevant part of my app.config:

<appSettings>
<
add key="Authentication" value="CSLA" />
<add key="CslaAuthentication" value="CSLA" />
<
add key="DB:Inspector" value="Data Source=192.168.1.1,1024;Initial Catalog=Inspector;User Id=text;Password=text;" />

<!-- <add key="PortalServer" value="http://www.chrisdearing.com/DataPortal.rem" />-->
<!--
<add key="PortalServer" value="http://localhost/raceinspectorweb/DataPortal.rem" />-->
<!--
<add key="CslaDataPortalProxy" value="Csla.DataPortalClient.WebServicesProxy, Csla"/>
<add key="CslaDataPortalUrl" value="http://localhost:3137/WebServicesHost/WebServicePortal.asmx"/>
-->
<
add key="CslaDataPortalProxy" value="Csla.DataPortalClient.RemotingProxy, Csla20"/>
<
add key="CslaDataPortalUrl" value="http://localhost/RaceInspector/RemotingPortal.rem"/>
<!--
<add key="PortalServer" value="http://www.race-manager.com/DataPortal.rem" />-->
</
appSettings>

 

Here is the relevant part of my web.config:

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<
appSettings>
<
add key="Authentication" value="CSLA"/>
<
add key="CslaAuthentication" value="CSLA" />
<
add key="DB:Program" value="Data Source=192.168.1.1,1024;Initial Catalog=Data;User Id=text;Password=text;"/>
<
add key="DB:Inspector" value="Data Source=192.168.1.1,1024;Initial Catalog=Inspector;User Id=text;Password=text;"/>
<
add key="DB:TestDB" value="testString"/>
</
appSettings>
<
system.runtime.remoting>
<
application>
<
service>
<
wellknown mode="SingleCall" objectUri="DataPortal.rem" type="CSLA.Server.DataPortal,CSLA.Server.DataPortal"/>
<
wellknown mode="SingleCall" objectUri="RemotingPortal.rem" type="Csla.Server.Hosts.RemotingPortal,Csla20"/>
</
service>
<
channels>
<
channel ref="http">

<serverProviders>
<
provider ref="wsdl"/>
<!--
TODO: comment the following two lines for .NET 1.0 -->
<
formatter ref="soap" typeFilterLevel="Full"/>
<
formatter ref="binary" typeFilterLevel="Full"/>
</
serverProviders>
</
channel>
</
channels>
</
application>
</
system.runtime.remoting>

I have renamed the dll to csla20 because I would have duplicates with the previous version which I still use. Is that an issue? Works fine locally..... Thanks in advance

Misled replied on Tuesday, July 04, 2006

I created a very simple app and got the same error at first. I realized that I did not put the <Serializable> attribute on either the principal or identity classes. I then went back to the app in question and resolved that. Same error. I then found that the url path in the app.config (value="http://localhost/RaceInspector/RemotingPortal.rem") was wrong. My bad. The moral of the story the way I see it is that the "Input String not in valid binary format" error can be caused by simple stuff which was misleading a bit. I just love programming... :)

Copyright (c) Marimer LLC