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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:26:56+00:00 2026-06-06T20:26:56+00:00

Prior to the asp.net 4 RC update, I had been using the WebApi for

  • 0

Prior to the asp.net 4 RC update, I had been using the WebApi for outputting XML. My model had XmlSerialization attributes [XmlElement(ElementName = "the name")] so that I could use friendlier names.

e.g.

[XmlElement(ElementName = "Branch")]
public string site_nm { get; set; }

After the .net 4 RC update, the XML which is output ignores this.

I know that some things have changed in the WebApi, like to make a method return values based on OData protocols when returning IQueryable<T>, you now need to add [Queryable] to your methods.

Is there something that I need to add to make the serialization work? I have read through change notes but can’t see anything.

  • 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-06T20:26:57+00:00Added an answer on June 6, 2026 at 8:26 pm

    You need to instruct the formatter to use XmlSerializer:

    GlobalConfiguration.Configuration.Formatters.XmlFormatter.UseXmlSerializer = true;
    

    The default now is the DataContractSerializer.

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

Sidebar

Related Questions

I've been a longtime ASP.NET developer in the web forms model, and am using
I have an ASP.NET application using an entity framework model. In an import routine,
Using NHibernate with ASP.NET 4. I have had no issues retrieving objects, but I've
I'm just starting out with ASP.NET, all my prior experience has been with desktop
I've got an ASP.NET app using NHibernate to transactionally update a few tables upon
I am using ASP.NET-MVC, and would like to format my html prior to sending
In my asp.net MVC application I am using in place editors to allow users
In asp.net we specify the redirect url when using forms authentications like this: <authentication
I recently did some performance testing and analysis of an ASP.NET application using out-of-process
I want to assign a value to an asp.net hiddenfield via javascript prior to

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.