473,396 Members | 1,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

SqlError Deserialization - Possible Version mismatch.

We have an application on one server and a web service on another server.
Our BLL and DAL layers are behind the web service. When a SqlException is
thrown, the application receives the following error:

System.Runtime.Serialization.SerializationExceptio n: Possible Version
mismatch. Type System.Data.SqlClient.SqlError has 8 members, number of
members deserialized is 7.

After reviewing SqlError, framework v1.1 contains the following fields:

private byte errorClass;
private int lineNumber;
private string message;
private int number;
private string procedure;
private string source = ".Net SqlClient Data Provider";
private byte state;

SqlError, framework v2.0 contains:

private byte errorClass;
private int lineNumber;
private string message;
private int number;
private string procedure;
[OptionalField(VersionAdded=2)]
private string server;
private string source = ".Net SqlClient Data Provider";
private byte state;

I'm assuming that the application itself is running on v2.0 somehow. I
checked the ASP.Net tab in IIS for the application and it is set to run
under .Net 1.1, not 2.0...anyone familiar with this and can shed some light
or any other types of tests I can run.

Thanks,
Mythran
Aug 30 '07 #1
1 1359

Bah, found the problem. The System.Data.dll version on the web service
server was 1.1.4322.2032 while the version of the same dll on the
application server was 1.1.4322.2300. Go figure. The dll on the
application server DOES define the new field that is visible in the 2.0 dll,
but it doesn't have the OptionalFieldAttribute and thus, the serialization
process throws the exception because there is an extra field in the dll that
is used when deserializing.

Hope this helps anyone else out there with similar probs :)

Thanks,
Mythran
Aug 31 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Chris Fonnesbeck | last post by:
I'm trying to run the latest Postgresql on OSX 10.3, but am receiving a version mismatch error when I try and run the database: dyld: psql version mismatch for library:...
4
by: Mike Sarbu | last post by:
Hello all, I have an XML file like this: <?xml version="1.0" encoding="utf-8"?> <SomeObject xmlns="http://www.abcinc.com/objectdefinition"...
3
by: Amadelle | last post by:
Hi all and thanks in advance for your help, I am having problems deserializing an object which seems to be serializing just fine. I save the byte array of the serialized object in the database...
3
by: AnkitAsDeveloper [Ankit] | last post by:
Hi i am serializing a 'ref struct' object as follows : private: void Seri( String ^path, Object^ obj ) { FileStream^ fileStrm ; try { //Serialize entire object into Binary stream
0
by: tshad | last post by:
Where does this error come from and what causes it? Possible Version mismatch. Type FtsData.Position has 142 members, number of members deserialized is 102. I did find a post that refers to...
2
by: andreas | last post by:
Hi, if have a object arrSdList of type SortedList for serialization and deserialization there are two subs for doing this Public Sub deser Dim Formatter As BinaryFormatter = New...
2
by: Clark Sann | last post by:
I've added a property to one of my classes and now, when I deserialize it I am getting a version mismatch. How to you add or subtract properties in classes that are being serialized /...
8
by: ashoksrini | last post by:
Hi All, I have the below requirement and would like to get some feeback from the group on the best way to implement: 1. I have WSDL defined exposing few web services. 2. We dont have a...
3
by: John Glover | last post by:
To whoever can help, I've been having a problem with XML deserialization lately. I needed to serialize and deserialze two objects which inherited from Hashtable. Because IDictionary...
1
by: Mythran | last post by:
We have an application on one server and a web service on another server. Our BLL and DAL layers are behind the web service. When a SqlException is thrown, the application receives the following...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.