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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:12:00+00:00 2026-06-02T01:12:00+00:00

Recently, we’ve been having a problem with our WCF service. This is how it’s

  • 0

Recently, we’ve been having a problem with our WCF service. This is how it’s set up:

  • The service has the necessary ServiceContracts and DataContracts
  • In a DataContract, there’s a readonly property (see below for code)
  • The client uses the same DLL with the Service- and DataContracts (so no WSDL)

This is the readonly property:

Dictionary<string, string> _list;

[DataMember]
public IDictionary<string, string> Fields
{
    get
    {
        if (_list == null)
            _list = new Dictionary<string, string>();
        return _list;
    }
}

The client ‘sets’ this property easily by using the Fields.Add() method.

Now recently we’ve been getting an exception that Fields should have a setter. I’ve read this on several other places, but this is the strange thing:

  • It worked fine on the client one day, not anymore the other day
  • It works fine on other clients, and has been working fine for about 1-2 year(s)

So why this sudden change? Could it be a different .NET Framework (the client may have updated overnight)? Are readonly properties really not supported in WCF, because it seems to work fine on other clients?

  • 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-02T01:12:02+00:00Added an answer on June 2, 2026 at 1:12 am

    I never got any news about this anymore, and I’m no longer on that project, so here are some hints at solving this, if you encounter the same problem:

    • Code is running in Partial Trust mode
    • Wrong version of .NET Framework installed (.NET 3.0 SP1 needed)
    • Don’t use Service References

    Clearly, in my case, the problem was down to one specific client. So the first two options are a possibility.

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

Sidebar

Related Questions

Recently our site has been deluged with the resurgence of the Asprox botnet SQL
Recently I've been creating a game but I'm having a problem. To calculate what
Recently I had a problem in a costumer's computer. Our installer would hang during
Recently, we discovered odd behavior in some old code. This code has worked for
Recently I was trying some practice programs in python and I came across this
Recently I've been working on some embedded devices, where we have some structs and
Recently, sometimes (rarely) when we export data from our application, the export log contains
Recently, I was challenged in a recent interview with a string manipulation problem and
Recently I have been learning about WMI and WQL. I found out the list
recently got an issue when loading vs 2008, it displays this... can anyone tell

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.