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 3354256
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:15:02+00:00 2026-05-18T02:15:02+00:00

so, I’ve got something like this: there’s an ASP.NET application (1) that references WCF

  • 0

so,
I’ve got something like this:
there’s an ASP.NET application (1) that references WCF service (2) that references .NET application (3). (1) creates query gives it to (2), (2) gets some info from (3), processes it and returns it back to the (1).

And here’s the issue – there’s DataContract class for request (that is used by both (2) and (1)) which has a DateTime object in it. When this DateTime is assigned in (1), everything is ok. But when a ServiceContract’s method is called with this request object, (2) sees this object as null (is DateTime was nullable), or 1/1/0001. String and Ints work just fine. No exceptions are being thrown.

CultureInfos are different on (1) and (2) and it has to stay this way. Using DateTime.SpecifyKind() doesn’t help.

I don’t want to cheat and send DateTime as string, bc it’s just stupid.

Is it serialization problem? If so, how to solve it?

I’m quite new to this, so… please, be gentle ;[
Thanks

UPDATE

Service config:

<service behaviorConfiguration="eServiceX.eServiceXInterfaceBehavior" name="eServiceX.ServiceXInterface">
          <endpoint address="" binding="basicHttpBinding" contract="eServiceXCommon.IeXService"></endpoint>
          <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
          <host>
            <baseAddresses>
              <add baseAddress="http://localhost:8732/eServiceX"/>
            </baseAddresses>
          </host>
</service>
..
<behavior name="eService.eServiceXInterfaceBehavior">
       <serviceMetadata httpGetEnabled="true" />   
       <serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>

Data Contract:

[DataContract]
public class GetXRequest : Request
{
        private string _name;
        private DateTime _date;
        [DataMember]
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }
        [DataMember]
        public DateTime DateTime
        {
            get { return this._date; }
            set { this._date = value; }
        }
}

… and the problem parts:

// ASP.NET app side:
X = new eService.ServiceXInterface();
eService.GetXRequest rq = new eService.GetXRequest();
rq.Name = "Blar";
rq.Date = SomeDay;
eService.GetXResponce Getter = X.GetX(rq); //here rq.Name is "Blar"; rq.Date is SomeDay

//..
// WCF service side:

[ServiceContract(Name = "IeXService")]
public interface IeXService
{
    [OperationContract]
    GetXResponce GetX(GetXRequest request);
}

public GetXHResponce GetX(GetXRequest request)
{
     doSMTH(request.Name, request.Date); //here request.Name is "Blar", but Date's value is 1/1/0001
     //..
}
  • 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-05-18T02:15:02+00:00Added an answer on May 18, 2026 at 2:15 am

    If anyone’s interested, it was my bad =[
    I defined Web Reference instead of Service Reference =[
    so… yeah… mistery solved

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

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
For some reason, after submitting a string like this Jack’s Spindle from a text
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I would like to count the length of a string with PHP. The string
this is what i have right now Drawing an RSS feed into the php,

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.