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

WebApi 2.0 - "Object reference..." occurring only on Azure environment

Hi All,I need some help as i am stuck in a weird problem.I have a WebApi 2.0 that's exposes methods which fetch the data from SQL server using Entity framework via Unity Controller. The Database layer...

View Article


When enable EnableCors is required

suppose i have web api and asp.net mvc is in same project and i am calling web api action by jquery from mvc view. in this kind of situation EnableCors is required ?tell me few situation when...

View Article


web api life cycle

i guess web api must have some life cycle like how request comes to web api and reach to action method. so please redirect me to in depth article for web api life cycle. thanks

View Article

regarding web api and mvc routing

web api routing coderoutes.MapHttpRoute( name:"ActionApi", routeTemplate:"api/{controller}/{action}/{id}", defaults:new{ id =RouteParameter.Optional});mvc routing coderoutes.MapRoute("Default", //...

View Article

How to add web api project in MVC 4/5 project

just tell me all steps one by one to add web api later into my asp.net mvc project. thanks

View Article


token can persist for long time in user pc

just tell me token can persist for long time in user pc like form auth cookie? what to do to persist token for next 7 days in client pc. this kind of design would be security risk?thanks

View Article

Impersonate issue in production server.

Hi All,        When I set impersonate enable=true it throwing error. Actually I am using the same Username and Password in other applications working fine.I am struggling there. ThanksError...

View Article

Need Basic Web API example for my model project

Hi,I want to use Web API for embedded machine communication. I have an embedded machine that sends 3 parameters value to Web API. In return I get 4 parameters value.I want to send CardNo, CardPass,...

View Article


WebAPI Entity Framework DB first with Web API OData controller: Issue with...

I have been facing an issue with Web API 2.2 with Web API OData controller. I am doing a PoC in which I need to display the JSON output from my service with different column names than that of...

View Article


The port number on Web API what, why and how is effected on real world...

Hi,I have build a very small MVC web application. Later I add very small Web API. It takes 3 parameters and returns 4 parameters (with use of Get Method).Every time I run my solution I can see IIS...

View Article

HttpResponseMessage.Headers.Etag is null, but the header is present.

Hello,   I am downloading a resource from web using HttpClient. The response message contains the Etag header, but when I try to access it via HttpResponseMessage.Headers.ETag property I keep getting...

View Article

Difficulty getting arrays of associated data in DTOs

I have extracted a database model from an existing database (as code first). I noticed that when I created an api for each table it produced an absolutely insane amount of results. Even when I had...

View Article

include properties of class to serialized response(json) in asp.net web api

hi all,i have a class inherited from list<T>.i add a new property to class named CountItems.how configure this class or webapi to CountItems property appear in serialized response?currently the...

View Article


ASP.NET WebAPI / MVC app to run on Windows IoT Core on Raspberry Pi

Hello,I am aiming to write a Home Automation project using Raspberry Pi and Arduino. All the plumbing of real HA part is working fine in isolation. Now I need to write a front-end for it. I took one of...

View Article

PushStreamContent with Post request

Hi,I'm trying to utilize the PushStreamContent class to stream results of a big query back to the client.I noticed that when I write results to the stream in the delegate passed to the ctor, the client...

View Article


Why web api url contains the word Api

i search google but found no write for Why web api url contains the word Api. in the above sample url has word called Api.if i need to omit the word Api then what to...

View Article

how to consume https webapi in C# Client side

I am new in asp.net webapi.in my C# Client side  I want to consume https webapi.my question is 1. Do I need to export client ssl certificate from server side to our local machine to work?below...

View Article


Web API : Formatting in the XML Response for the DateTimeOffset datatype

Below is the property in my model: public DateTimeOffset AcquireDate { get; set; } Below is the configuration in WebApiConfig: config.Formatters.Clear();config.Formatters.Add(new...

View Article

facing error 404, resource not found

i am using web api for httpget method in my project. i run my application in my pc and a test server. everything is working fine there. but when i deploy it in fresh pc having windows server 2008 r2...

View Article

what to return from a web-api method

Hi - sometimes I see web-api methods which return a custom object:[AcceptVerbs("GET")] public CustomerInfo GetInformation() ...Sometimes I see a return value like IHttpActionResult:[HttpGet] public...

View Article
Browsing all 4850 articles
Browse latest View live


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