none
Date Time members getting initialize to 01/01/0001 while sending correct data 08/07/2014 to service RRS feed

  • Question

    1. Hi I have created a WCF service which is consumed by a windows form application. I have created an entity on service side, that has various members of different type(string, other entity, int etc). It is strange that I am able to send all other data from windows form application to service, but few of them are getting initialized to zero or there null values and date time as 01/01/0001. 

    it is strange since the same application that has same service and windows form application, works fine under different system but it is not working on my system.

    Monday, July 21, 2014 5:55 AM

Answers

  • You are only getting the time portion of the date-time number.  I indicates there is a difference between the Net Library in the build and deploy computers.  for an application to run one of the following two things have to occur

    1) The same version of Net Library (including updates) have to be in the build and deploy computer.

    2) You have to publish the application and install with setup.exe.

    Since you arre using Visual Studio 2010 then you should be using Net 4.0 (not Net 4.5 which only works with VS 2012).


    jdweng

    Monday, July 21, 2014 9:11 AM

All replies

  • Somebody is forgetting to enter data into the form.  The form shouldn't submit the data to the service unless all the textboxes have data.

    jdweng

    Monday, July 21, 2014 7:24 AM
  • Hey Joel,

    No this is not the case, all the controls have values in it. This is working in other systems but not on mine. Is there any system related configuration do I have to check . I am using Visual Studio 2010 Ultimate edition.


    The very basic thing that I have done was setting Specified property to true for the member. And it worked I was able to send the actual data to service. But I can not do this manually for all the members. Is there is a way to do this for all?
    Monday, July 21, 2014 7:46 AM
  • You are only getting the time portion of the date-time number.  I indicates there is a difference between the Net Library in the build and deploy computers.  for an application to run one of the following two things have to occur

    1) The same version of Net Library (including updates) have to be in the build and deploy computer.

    2) You have to publish the application and install with setup.exe.

    Since you arre using Visual Studio 2010 then you should be using Net 4.0 (not Net 4.5 which only works with VS 2012).


    jdweng

    Monday, July 21, 2014 9:11 AM