Print Page | Close Window

Binary Stream ‘50’ Does Not Contain a Valid BinaryHeader

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=70
Printed Date: 12-Jun-2026 at 9:59am


Topic: Binary Stream ‘50’ Does Not Contain a Valid BinaryHeader
Posted By: Customer
Subject: Binary Stream ‘50’ Does Not Contain a Valid BinaryHeader
Date Posted: 06-Jun-2007 at 3:53pm

Question:

I've deployed to IIS 6.0 onto another server. I run my application and receive the following message at the time a PersistenceManager instance is being created.

Binary stream '50' does not contain a valid BinaryHeader. Possible causes are invalid stream or object version change between serialization and deserialization.

To troubleshoot, I've added two lines to the TestAsa.aspx file. Upon calling the page (from either a client workstation, or from a browser on the server), I receive the same message.




Replies:
Posted By: IdeaBlade
Date Posted: 06-Jun-2007 at 3:54pm

Answer:

This is a common error message that appears during IIS deployment failures.  It is especially common with IIS 6.0.  We suspect that this is another case of authentication and/or security problems.

We'd troubleshoot this problem the same way we did with our initial deplayment.  Start with the simple case.  Don't use a "Log" file or loose ibconfig file.  Check for a NAT on server:  not configuring the NAT is probably the number one cause of this error message. 

Is this a Windows 2003 Server?  If so, reread Josh's documents.  Use SQL Server password if possible.  IIS 6.0 uses NETWORK_USER, not ASP.NET as default Windows account.  Check permissions on Virtual Directory.

After discovering that the problem only occurred using log directory and Windows Authentication, we suggested:

Sorry about the trouble with the log directory. Using Windows Authentication, the "user" account aliased by IIS 6.0 is no longer the "Network Service" account. IIS uses whichever Windows account that gets authenticated. So, you will need to grant NTFS "write" permissions to the "Users" group on the log folder. By default, the "Users" group only has read.

Therefore, depending on which IIS authentication you use: Anonymous or Windows Integrated, you would grant NTFS write permissions on the log folder to either the Network Service user account or the Users group. You could just grant write permissions for both if you want to easily switch from each authentication type.

We added the Windows account used for impersonation to the local "Users" group. We then added the "Users" group to the log folder permissions with Modify rights.




Print Page | Close Window