Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7876903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:14:31+00:00 2026-06-03T03:14:31+00:00

I have two client applications connecting to an Windows Server AppFabric Cluster (there is

  • 0

I have two client applications connecting to an Windows Server AppFabric Cluster (there is only one node). Client 1 Puts an object which has a datetime field to Cache (All entities are defined in a different C# class library project). When I Get this object through Client 1, everything looks good, however when I retrieve the same object through Client 2, I get the datetime field set to 01-01-0001 00:00:00 all the time. However, if I decorate the DateTime field with [DataMember] attribute, it works fine. Could someone please tell me what is going on?

Update: Client1 is a WCF service, and Client 2 is an ASP.NET application. Framework used is 4.0.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:14:32+00:00Added an answer on June 3, 2026 at 3:14 am

    AppFabric serializes the type (using NetDataContractSerializer). If that type is decorated with [DataContract], then only the members marked with [DataMember] will be serialized. If the type is not decorated with [DataContract], then IIRC it defaults to BinaryFormatter behaviour, i.e. serializing the fields – it may or may not want [Serializable] in this case.

    So: it sounds like the type is a data-contract so yes; you’ll need to mark it [DataMember] – otherwise it will assume the all-zero value (DateTime.MinValue, aka 01-01-0001 00:00:00)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on Windows client application using c#, have two projects in my
I have two Rails apps, one client using ActiveResource and one service. I am
I have been just learning redis and node.js There are two questions I have
I am writing two console applications, a client and a server. I'm a little
I have two utilities written in C++, TCP/IP server and client that I have
I have a server which sends two messages to the client in a row:
I have two service. 1- client 2- server. Both the services communicate through socket.
I have two swfs: application swf p2p client swf that allows to load data
I have two tables: Client(id,name,...) Purchase(id,item,date,client_id,...) They have their respective Model, with their validations.
The problem: let's say I have two tables Client , and Product , in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.