WCF proxy with duplicate classes


A year ago I wrote a post about WSSF and shared datacontracts. Well I am still using those lines of code to generate my own proxies for WCF services. A couple of months this was working very well on my new project. Somehow after an unknown change the generation of my datacontracts and proxy wasn’t working anymore. The datacontracts are still generated into a separated file but my proxy also contains my datacontracts which results in ambiguous compilation errors in my client application. After searching and troubleshooting for a couple of hours i found the solution. I made a simple change to my service contract in WSSF. I changed a response MessageContract from IsWrapped=false to IsWrapped=true. Well this is something i do very often so i couldn’t imagine this was the problem. I am used to change the IsWrapped property of my Request MessageContracts. You can set this property to true on the request without setting it to true on the response. This doesn’t have any consequences for the generation of your proxy. When you set the IsWrapped property of your response to true and on the request it’s still false, this will give you duplicate classes in your proxy.

Solution: “If you change the IsWrapped property of the response MessageContract make sure you do the same for the request MessageContract, otherwise you get duplicate classes into your proxy”

See the workitem on codeplex



8 Responses to WCF proxy with duplicate classes

  1. Who had said, And that?s it?AT?Just something that, However Although these.Assets frozen and, ways of installation.These are important time relaxing, sjlv att stta the internet They.As where you, of the prospective.,

  2. Very quickly this web site will be famous among all blog users, due to it’s good content

  3. I don’t know if it’s just me or if everybody else encountering issues with your site.

    It appears as if some of the written text within your posts
    are running off the screen. Can someone else please provide feedback and let me know if
    this is happening to them too? This could be a issue with my browser because I’ve had this happen before.

  4. aipinbu.com says:

    I’m no longer sure where you are getting your
    information, however good topic. I must spend a while finding
    out more or working out more. Thank you for fantastic information I was on the lookout for this information for my mission.

  5. At retirement, two choices there for the retiree.
    s as well as other retirement plans in a certified gold IRA.
    With a Roth IRA you happen to be typically (with a few exceptions) not taxed if you withdrawal the money for retirement
    however, you also receive no tax deduction when contributing to your Roth IRA.
    Most successful investors have more than 25% of retirement funds in gold because the precious metal could offset losses seen with dollar-backed investments while at the
    same time increasing in value as golds spot price increases on
    account of higher safe-haven demand. In order to get
    gold as a possible investment, individuals have to establish a gold
    IRA account, where in they can get going
    for expenses post retirement.

  6. Christy says:

    I love your blog.. very nice colors & theme.
    Did you design this website yourself or did you
    hire someone to do it for you? Plz answer back as I’m looking to create my own blog and would like to know where u got
    this from. cheers

  7. Deer Hunter 2014 Cheats

    You’ll be able to enhance your current. Glu Credits,
    Hunter Buck having amount you would like.

    An individual only need to download tool deer hunter 2014 cheats
    – Hacks and need virtually any exprience..
    deer hunter 2014 cheats might help for you personally create plenty of quantity Glu Credits, Hunter Bucks along with only a
    simply click your current computer mouse button.
    It is really simple with your tool.

  8. Ward says:

    I know this if off topic but I’m looking into starting my own weblog and was curious what all
    is required to get setup? I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very web smart so I’m not 100% sure.
    Any tips or advice would be greatly appreciated.
    Thank you

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: