If using dataportal connection and trying to upload files larger 4MB via Wiki

If you are using a dataportal connection, and trying to upload files via Wiki that are larger than 4MB you may experience the following error:

[i]FATAL AyaNova.Form1 - Unhandled exception

System.Runtime.Serialization.SerializationException: The input stream is not a valid binary format. The starting contents (in bytes) are: 3C-21-44-4F-43-54-59-50-45-20-68-74-6D-6C-20-50-55 …[/i]

This is due to the settings of your IIS and ASP.NET

If using IIS 7 or IIS 8, do the following:

  1. Have all users out of their dataportal connection (because the connection may get dropped when settings are updated, so best to be safe than sorry)

  2. On the server where your IIS and dataportal web site is running, move to the AyaNova program folder that your dataportal application uses (default usually is C:\Program Files\Ground Zero Tech-Works Inc\AyaNova unless are a hosting company or have multiple AyaNova databases and folder locations)

  3. Make a backup of the existing web.config file (again, always better to be safe)

  4. use NotePad to open the web.config file

Your web.config for the dataportal will initially look like:

[i]
<?xml version=“1.0” encoding=“utf-8”?>
<configuration>
<!-- *********************************** DO NOT EDIT ANYTHING BELOW THIS POINT *****************************–>
<!-- ********************************************************************************************************–>

<system.runtime.remoting>
<application>
<service>
<wellknown mode=“SingleCall” objectUri=“DataPortal.rem” type=“CSLA.Server.DataPortal, CSLA.Server.DataPortal” />
</service>
<channels>
<channel ref=“http”>
<serverProviders>
<provider ref=“wsdl” />
<formatter ref=“soap” typeFilterLevel=“Full” />
<formatter ref=“binary” typeFilterLevel=“Full” />
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>

<runtime>
<assemblyBinding xmlns=“urn:schemas-microsoft-com:asm.v1”>
<probing privatePath=“bin/…” />
</assemblyBinding>
</runtime>

<system.web>
<compilation defaultLanguage=“c#” debug=“false” />
<customErrors mode=“Off” />
<authentication mode=“Windows” />
<authorization>
<allow users="*" />
</authorization>
<trace enabled=“false” requestLimit=“10” pageOutput=“false” traceMode=“SortByTime” localOnly=“true” />
<sessionState mode=“Off” stateConnectionString=“tcpip=127.0.0.1:42424” sqlConnectionString=“data source=127.0.0.1;Trusted_Connection=yes” cookieless=“false” timeout=“20” />
<globalization requestEncoding=“utf-8” responseEncoding=“utf-8” />
</system.web>
</configuration>

[/i]

  1. Edit your web.config for the dataportal so has the following additional lines:

[i]
<?xml version=“1.0” encoding=“utf-8”?>
<configuration>
<!-- *********************************** DO NOT EDIT ANYTHING BELOW THIS POINT *****************************–>
<!-- ********************************************************************************************************–>

<system.runtime.remoting>
<application>
<service>
<wellknown mode=“SingleCall” objectUri=“DataPortal.rem” type=“CSLA.Server.DataPortal, CSLA.Server.DataPortal” />
</service>
<channels>
<channel ref=“http”>
<serverProviders>
<provider ref=“wsdl” />
<formatter ref=“soap” typeFilterLevel=“Full” />
<formatter ref=“binary” typeFilterLevel=“Full” />
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>

<runtime>
<assemblyBinding xmlns=“urn:schemas-microsoft-com:asm.v1”>
<probing privatePath=“bin/…” />
</assemblyBinding>
</runtime>

<system.web>
<httpRuntime maxRequestLength=“2097151” executionTimeout=“3600”/>
<compilation defaultLanguage=“c#” debug=“false” />
<customErrors mode=“Off” />
<authentication mode=“Windows” />
<authorization>
<allow users="*" />
</authorization>
<trace enabled=“false” requestLimit=“10” pageOutput=“false” traceMode=“SortByTime” localOnly=“true” />
<sessionState mode=“Off” stateConnectionString=“tcpip=127.0.0.1:42424” sqlConnectionString=“data source=127.0.0.1;Trusted_Connection=yes” cookieless=“false” timeout=“20” />
<globalization requestEncoding=“utf-8” responseEncoding=“utf-8” />
</system.web>


<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength=“30000000”/>
</requestFiltering>
</security>
</system.webServer>
</configuration>

[/i]

The above lines all have to be added to initiate the IIS AND the ASP.NET

  1. Save the file

  2. Via your IIS management console, restart the application pool for your dataportal web site, and restart the dataportal website.

  3. Now log in with a dataportal connection and confirm can now upload files larger than 4MB (above example allows up to 30MB - don’t make it bigger than you actually have to)

If you receive an error running AyaNova after doing the above, return your web.config to the original, restart the site again, and confirm can connect again. Then redo your steps again, as may have been an error when you edited your web.config