title: How to show the status code with custom message in c#?
body: <p>In MVC5, I have used the below code to return the status code with a custom message. It shows the provided message in my output.</p>
  
  <pre><code>return new HttpStatusCodeResult(403, "Not allowed");
  </code></pre>
  
  <p>In .net core framework, above method is not applicable, so I tried the below method but I didn't find how to pass the custom message.</p>
  
  <pre><code>StatusCode(403) 
  </code></pre>
  
  <p>It shows the default message as  "Forbidden"</p>
  
  <p>How can I provide the custom message in StatusCode? Are any other methods available?</p>