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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:03:36+00:00 2026-06-17T06:03:36+00:00

I have a WCF Client and A WCF Service, There is a DataContract at

  • 0

I have a WCF Client and A WCF Service,

There is a DataContract at each end. Namespace is required for me to deserialize the object on the client.

ie the blow doesn’t work

[DataContract]
public class Framework
{
    [DataMember]
    public string Name { get; set; } 
}

but this does:

[DataContract(Namespace = "http//mysite.co.uk"]
public class Framework
{
    [DataMember]
    public string Name { get; set; } 
}

Why is this? I would have thought leaving the namespace would have meant that they both defaulted to http://tempuri.org and would both be fine.

It seems odd that namespace is required.

Does anyone have an explanation for this behaviour?

  • 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-17T06:03:37+00:00Added an answer on June 17, 2026 at 6:03 am

    It should default to the tempuri namespace as you stated. I have done this many times, so I know that it works. My guess is that the incoming data is using the namespace http//mysite.co.uk, so that is causing it to fail. The namespace of the DataContract must match the namespace used in the SOAP message.

    Are you using assemblies or discovery to share your service contract? Maybe your contract is out of date on one end and needs to be refreshed (either by rerunning discovery or redeploying the shared assembly).

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

Sidebar

Related Questions

I have a WCF service and have to expose an interface as datacontract. There
I have a WCF service that gets called from a client. When there is
I have a WCF client/service app that relies on secure communication between two machines
I have a WCF client & service, where service (which is hosted inside a
I have a REST service consumed by a .Net WCF client. When an error
I have a WCF Service that I want my client to be able to
I have a WCF service as part of a client/server application I am working
I have a WCF service with a function GetData() When my client calls this
I have a WCF service that receive query from a silverlight client and send
I have a WCF service and without changing any code on the client side,

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.