Questions tagged [webapi2]

127 questions
-1
votes
1 answer

How to return BadRequest response with custom error model? WEB API 2

I want to return below json with BadRequest { "error": { "code": "BAD_REQUEST_ERROR", "description": "frId is/are not required and should not be sent", "source": null, "step": null, "reason": null, …
Mayur Patil
  • 63
  • 1
  • 7
-1
votes
1 answer

I am getting Cross origin error using angular 4 webapi2

I am working on an application using angular 4 and Web api. I am getting CORS error even I have kept code in Web.config , Start Up, WebApiConfig and on Controller as well but still i am getting this error. I don't to how to figure it out. Here is my…
Shamshad Jamal
  • 19
  • 3
  • 17
-1
votes
1 answer

asp.net web api2 multiple projects

I want to create 4 asp.net web api2 projects under one solution and lets say projects are named P1(UI) P2(UI) P3(UI) P4(Service) these projects will be deployed to different active directories and I want that all UI projects should use service from…
-1
votes
1 answer

How to Push Notification That User Is Running Old Version?

Scenario: User is logged in. Site is updated. User has cached html/js and calls an old endpoint. The world ends. I know sites often say something along the lines of "The product has been updated, refresh your browser." But how is this normally…
VSO
  • 11,546
  • 25
  • 99
  • 187
-1
votes
1 answer

NHibernate in WebApi2 - issues with updates and deletions

insert into,select all work correctly. when i update the data ,it not update to the sql server(as no sql exec to server,in the server is the old data not be updated). but when select to this record,it return the updated data has been updated. after…
徐先美
  • 1
  • 1
-2
votes
1 answer

Why ajax passing null or 0 value to controller?

var newRecords = []; values: [ { "id": 7, "name": "Raddish", "rate": 30, "weight": "5", "amountperweight": 150 }, { "id": 8, "name": "Peas", "rate": 35, "weight": "6", "amountperweight": 210 …
Dani
  • 1
-4
votes
2 answers

Need rules/doc for casting JSON to c# class

I am trying to trouble shoot an angular controller calling c# webApi2 project. I do not think I fully understand how c# goes about casting JSON to a type. I often get null in the webform_ variable [System.Web.Http.HttpPatch] …
greg
  • 1,673
  • 1
  • 17
  • 30
1 2 3
8
9