Quantcast
Channel: Web API
Browsing all 4850 articles
Browse latest View live

Override AccessTokenExpireTimeSpan

Is possible to override the default AccessTokenExpireTimeSpan for a specific ticket on a custom OAuthAuthorizationServerProvider? The default expiration time for all other tickets is 15 minutes. public...

View Article


Controller method naming, any sense in staying with traditional verbs?

With Web API 2 and attribute routing, it seems I can easily name my api controller methods anything I want.  For example, instead of a Get(), I can have a GetStudents(), and instead of Get(int Id) I...

View Article


Async calls between multiple WebAPI services

I've been given a task to design and develop some WebAPI services. I've never worked with WebAPI before. To keep it simple:Service 1 will be invoked to retrieve, process and save thousands of objects....

View Article

Error - Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module...

I get this error while running a Get operation using Postman application - HTTP Error 500.21 - Internal Server ErrorHandler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module...

View Article

Special characters for ODATA service input

I have HttpGet function which expects string parameter: [HttpGet] [ODataRoute("SubCategories/Default.GetByHint(Index={index},Hint={hint})")] public async Task<IHttpActionResult>...

View Article


Web API 2.2 with OData and Session support

We have an existing web application (almost 10+ years old now) running on .net 4.5.2 and we are retrofitting it with OData v4.0 and WebAPI v2.2 support so we can add some of the newer features like...

View Article

Can not connect to API.

Hi I have created one MVC application in which i have to connect third party web api's and get required data from them and display those data in my views.Now here the thing is i am able to connect to...

View Article

Image may be NSFW.
Clik here to view.

PUT to web api saves update to DB but returns 500 error in HTTPMessageResponse

Consuming web api from mvc controller:[HttpPost] public ActionResult Edit(Recipient model) { string svcEndPoint = string.Format("http://localhost:17305/api/recipient/{0}", model.RecipKey); using...

View Article


WebAPI to access TestTools.UITesting functionalities

//UITestExtensionPackages issue.Hello, All:I am writing a WebAPI which has a reference to a  library in which i have a simple method to perform an operation. The Library method uses/refers...

View Article


Accessing Memory Mapped File from Web API

Hi all,I need to access a memory mapped file from one of my routes in my Web API. Using the normal IIS worker settings I have no luck and my service always returns "File not found". I tried to add the...

View Article

When to use WebMessageBodyStyle.Wrapped for Web API?

When is it appropriate to use a WebInvoke BodyStyle of WebMessageBodyStyle.Wrapped? Should this only be used for PUT requests? Are there any scenarios where this should be used for other types of REST...

View Article

Looking for an open source PCL for accessing any Web API (read only is fine)

As a side project while learning c#, I'd like to create a PCL so .NET developers can easily access the  SunLight Foundation's Congress API (https://congress.api.sunlightfoundation.com/.  They currently...

View Article

Problem processing JSON generated by JSONcpp

I am building the following JSON using JsonCpp in a C++ app:PUT http://localhost/AvionBiometricRestService/api/Identify/ HTTP/1.1 Accept: */* Content-Type: application/json User-Agent: Mozilla/4.0...

View Article


XMLHttpRequest cannot load URL. Invalid HTTP status code 400 (angularJs on...

I have WebApi Application and a simple consuming web client. I am sending requests to webApi using angularJS from web client.I have had problems with Post on chrome but I fixed it using param to the...

View Article

when save new invoice it saved items on other open invoices in other pc's ?

Hii try to use angularjs & API in my Invoice project, i finally did it and it works fine but i have 3 problems on it:1. (solved by workaround it, but really need an better way for that) - when open...

View Article


PUT method not supported

I am trying to test my Rest Web API through postman. I got the error  "Message": "The requested resource does not support http method 'PUT'."[HttpPatch] [HttpPut] public HttpResponseMessage PUT(int...

View Article

How do I make calls to a WEB API & REST API using C# Console Application

1. How do you upload (POST) contact or list data (not using a file) from MSSQL Server database to WEB API & REST API, via curl and C#2. How do you upload (POST) a file from MSSQL Server database to...

View Article


How to inject an instance of a type, per request using Unity Container for...

public class StoreDetails { public int StoreId { get; set; } }I want to create an instance of StoreDetails for per request to Web API. This instance will be used as dependency for various other classes...

View Article

C# WebAPI - Calling POST Method Within Controller with Model as Parameter

I can't figure out why the below calls to my "GetBatch" webapi method isn't working. I am not sure if I need to specify the route, etc. I do have other HttpPost methods but note that I am specifically...

View Article

How do I test Put Method

I have following code for Put method for my ProductController.public HttpResponseMessage Put(int id, Product product) { if (ModelState.IsValid && id == product.Id) { var result =...

View Article
Browsing all 4850 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>