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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:07:53+00:00 2026-06-06T09:07:53+00:00

According to the HttpResponseMessage documentation on MSDN, the reason phrase (as in, the OK

  • 0

According to the HttpResponseMessage documentation on MSDN, the reason phrase (as in, the “OK” part of 200 OK) should be settable. The HTTP response does let me set the reason phrase:

HttpResponseMessage response = new HttpResponseMessage(System.Net.HttpStatusCode.Conflict);
            response.ReasonPhrase = "conflict message";

However, when I consume the response on the client side as a WebResponse, I don’t see my custom reason phrase. I’d expect to find it under the StatusDescription. Looking at the raw response using Fiddler, it doesn’t seem that the reason phrase gets set on the server.

A helpful coworker pointed out that with action results (and derived), I could do something akin to:

new HttpStatusCodeResult(System.Net.HttpStatusCode.Conflict, "conflict message");

It seems as though that is the precise functionality I’m after, but I’m uncertain how to convince WebAPI to cooperate.

Where am I going wrong?

  • 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-06T09:07:55+00:00Added an answer on June 6, 2026 at 9:07 am

    The ReasonPhrase does not work in Cassini. Use IIS Express rather than Cassini and you will find that the response includes the reason.

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

Sidebar

Related Questions

According to http://msdn.microsoft.com/en-us/library/ms535934(v=VS.85).aspx and http://msdn.microsoft.com/en-us/library/ms535262(v=VS.85).aspx , I should be able to do the following
According to connects documentation the session should expire when the browser is closed: By
According to the MSDN article found at http://msdn.microsoft.com/en-us/library/wyk4d9cy.aspx the floating-point value .1 has no
According to the MSDN documentation , a ribbon:RibbonControlSizeDefinition can be used to control the
According to the documentation, they're pretty much interchangeable. Is there a stylistic reason to
According to developer.apple I should be able to set UISLider's property - thumbTintColor/minimumTrackTintColor/maximumTrackTintColor -
According to the docs: http://msdn.microsoft.com/en-us/library/x13ttww7.aspx : The volatile keyword can be applied to reference
According to the MSDN documentation , transactional NTFS doesn't seem to allow one to
According to this question and the documentation of attr_readonly the following should be possible:
According MSDN, FxCop is an application that analyzes managed code assemblies (code that targets

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.