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

In asp.net webAPI, Which is a better way to log Request and Response either...

In asp.net webAPI, which is a better approach to log Request and Response or Exception either using Delegating Handler or Action Filter?could you give me a simple example for the better approach.Thanks...

View Article


How to PATCH in Web API and OData

From reading the RFC specification of the Patch verb it's clear that the `Patch` verb shouldn't get values to partially update the entity but operations to make:"...With PATCH, however, the enclosed...

View Article


Using MCV4 - output to text.

Hello,I am using MCV4, same as https://www.youtube.com/watch?v=H9vBxAH4f5EEvery time I make a get function, The browser trying open a json format, by default.The output string is json formatted (by...

View Article

WebApi: Order execution of ExceptionFilter and ActionFilter

Hi!I am using ASP.NET WebApi. There is global ActionFilter that is used for logging special information about each request. There is global ExceptionFilter that is used for logging information about...

View Article

Typleless web api, EdmEntityObjectCollection, $expand, $select

Hi, Typeless web api odata v4 is used.Consider entities Category, Product. Each product has many categories.No CLR classes are available (no separate class as Product / Category)EdmEntityContainer,...

View Article


What's the recommended approach for union operation with Linq...

HiI'm using WebAPI 2.2 with EF 6.1.1 and OData 4. I've designed an EF model that uses TPH (table per hierarchy).I would like to use a DataServiceCollection<T> (where T is the base type) as a...

View Article

web api question with mef

Hi I am writing an asp.net mvc 5 web api using mef 2. I am using several concrete repositories each uses an IContext interface. There is apublic class Context : IContext { public Context() { } }Every...

View Article

MVC 5 and WebApi in a single project?

Hi,I currently have a MVC 5 application using EF6 and we need to add Web API on top of it.  I can simply scaffold new Web API controller using different controller name within the same project but I...

View Article


How to configure number of TCP connections using HttpClient?

I used to use HttpWebRequest.ServicePoint.ConnectionLimit to manage the number of persisted TCP connections used by my client code. I am planning to useHttpClient for a new app, however I couldn't find...

View Article


ODATA Web API Authentication

We are developing odata web api and it will be deployed in Azure. But before deployment we wanted to implement the Authentication to it. Authentication should be ADFS authentication.I got some tutorial...

View Article

API Method to accept different file types (for upload)

I've been using Web Api in it's most basic form for a while and got to step out of the scope of how I used to do things.Need to create a method that will take in a file that need to be processed.This...

View Article

Can a DelegatingHandler change the Uri ?

Hi,I'm trying to migrate some of my WCF Web API Samples to ASP.NET WebAPI. In one of thouse samples, I used the following FlatFileExtensionHandler I found in the former samples. This Handler cuts off...

View Article

The requested resource does not support the method http 'PUT'

I'm developing a Web Api 2 service with latest .NET Framework and C#. I have a controller with these methods: public IEnumerable<User> Get() { // ... } public User Get(int id) { // ... } public...

View Article


Create a web api to transfer values from win forms to web forms and vice versa.

Hello,I need to create a web api to communicate between winform application and mvc application.How can i do that using web api.Please share some code or articles that may help.Thanks,Regards,Ashim...

View Article

Cannot fix http 405 error after deployment

Hello,I have published a web api project to our test server, and now we cannot call any PUT or DELETE operations from the client application. These operations are woking nicely when using the Visual...

View Article


"Method Not Allowed" Web API Service Reference

Hello All,My team is using Web API for a unique scenario, which was working correctly, until we upgraded the Web API project from OData 3.0 to OData 4.0. We have created a Web API project that, instead...

View Article

Web API with Android App?

Hello all!!I recently started developing an app for Android. I did my site in ASP.NET MVC and the database is hosted on a server. The database is a MS SQL database. I need for my app to access the...

View Article


NOK$ERROR$The remote server returned an error: (414) Request-URI Too Large.

NOK$ERROR$The remote server returned an error: (414) Request-URI Too Large. try { WriteErrorLogs("Request", DateTime.Now.ToString(), sData); WebRequest req = null; WebResponse rsp = null; req =...

View Article

Individual accounts error unsupported_grant_type

I am starting a project where I want a phone app to read from a webapi.I am not sure about authentication but looked at the Individual accounts example here...

View Article

Securing a web app

I have a web app that users do not need to log into, but all the same I don't want others to be able to get to my webapi from fiddler for example.I can solve this problem by setting up a user for my...

View Article
Browsing all 4850 articles
Browse latest View live


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