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

  • Home
  • SEARCH
  • 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 305115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:20:36+00:00 2026-05-12T07:20:36+00:00

I have WCF restful service and have property called Image with Imageclass [DataMember] public

  • 0

I have WCF restful service and have property called Image with Imageclass

[DataMember]
public Image Image { get; set; }

and getting the below error when trying to call the method having a object with above property

System.Runtime.Serialization.SerializationException: Type ‘System.Drawing.Bitmap’ with data contract name ‘Bitmap:http://schemas.datacontract.org/2004/07/System.Drawing‘ is not expected. Add any types not known statically to the list of known types – for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.

  • 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-12T07:20:36+00:00Added an answer on May 12, 2026 at 7:20 am

    The error pretty much tells you how to solve the problem: add System.Drawing.Bitmap as a known type on the contract:

    [DataContract]
    [KnownType(typeof(System.Drawing.Bitmap))]
    class YourContract
    {
        [DataMember]
        public Image Image { get; set; }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF restful service that I'm trying to upload an image to.
I have two WCF RESTful services - the general service is public and has
I have a RESTful WCF web service called "Palladium" as a project in my
I have a WCF RESTful service with a property defined in global.asax . How
recently I have set up a WCF restful service with EF4. It all worked
We have created a WCF RESTful service for a WPF(UI) Application. The UI sends
I have a very simple (new to this) RESTful WCF service that uses a
I have a wcf restful service with a operation contract that contains two values
I have a WCF service with multiple operations exposed as a RESTful API. Most
I have a requirement to access the HttpContext.Current from with-in a RESTful WCF service.

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.