Home > Linq to Sql > ‘IsReference’ property specified was not found

‘IsReference’ property specified was not found

The other day I got an error message that said “’IsReference’ property specified was not found”. I started doing some research on it and most people were referring to WCF. The interesting thing in my case was:
1. I wasn’t using WCF
2. This wasn’t happening on the development environment. It only happened when we moved to staging.

So, I had to start figuring out what was going on. I narrowed the issue down to DataContractSerialization. Basically, the situation I was dealing with was that I was serializing Linq to Sql objects. If you have worked with Linq to Sql before, you would know that they are not easily serialized. In fact, they are not marked with the serializable attribute. Instead, they are marked with the Data Contract attribute. So, if you want to serialize them for any reason (my reason was that I wanted to store them in Session), then you have to use the DataContractSerializer to do the serialization. The DataContractSerializer was introduced for WCF – thus the reason why most of the references I saw about this error were talking about WCF.

So, now that I narrowed the issue down to my serialization, I had to figure out what was happening. I noticed that my Linq to Sql objects were marked with the Data Contract attribute and a property called “IsReferenced”. Ok, now I know this marking is causing the issue. But, why was this issue working in my environment and not staging.

Well, the answer ended up being the version of .net. I was told that the staging servers were upgraded to .net 3.5 sp1. However, when I looked closely, I noticed that one of the front end servers (in our case there were many front end servers) was only .net 3.5. That’s what I get trusting IT guys, I have to double check everything they do :).

It turns out that even though the DataContractSerializer was around in the .net 3.5, the marking of “IsReference” wasn’t introduced until .net 3.5 sp1. So, if you get this error, you might want to check out your version of .net before starting to debug.

Advertisements
Categories: Linq to Sql
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: