Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
Partner API
Composite API
Open API
Internal API
Composite API
Soap API
FullContact API
Amazon S3 API
Boss Mobile
Fujezone Mobile
 Nokia Mobile
 :) Hot Jobs
 
 :) Latest Articles


  

 


Code snippet to return 404 errors from HttpError?
Question Posted on 04 Sep 2022

Home >> API >> Web API >> Code snippet to return 404 errors from HttpError?




Code snippet to return 404 errors from HttpError?
Below is the Code for returning 404 error from HttpError:-

string message = string.Format(“TestCustomer id = {0} not found”, customerid);

return Request.CreateErrorResponse(HttpStatusCode.NotFound, message);
0
0



 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


Other Important Questions
What do you mean by content negotiation in .NET Web API?
Is it possible to return view from .NET Web API method?
Difference between RESTAPI and RESTful API?
Write the five most common differences between MVC and WEBAPI?
What do you mean by TestAPI?






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |