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

Api Domain Redirection

Hi guys, Our company is moving their production server to different hosting provider. We have bunch of rest api's deployed on our existing production server. We want to host these web services on the...

View Article


The type initializer for 'System.Web.Http.GlobalConfiguration' threw an...

Hi everyone,I've updated my WEB API 2 project's nuget packages.Previously, it ran fine, but now, when I start debugging the application, it throws me an exception:Could not load file or assembly...

View Article


Error showing while inserting in to table using WebApi in webform

Iam new to WebApi.I want to add records into table using webapi in a webform.I created a webform application.Iam using VS2013 Ultimate.I the Models folder I add class file Cutomers public class...

View Article

Consuming webapi with two parameters

HelloI am trying calling an api passing two parameters just for test.public void GetBalance(string accountNumber,int officeId) { using (var client = new WebClient()) {...

View Article

Why does API call work in Sharepoint site but not subsite

API published to an internal IIS site (http://mysite:40):[EnableCors(origins: "http://mylocalweb , http://mylocalweb/subsite", headers: "*", methods: "*")] //mylocalweb is the sharepoint site and...

View Article


Alternative of Session in web-api asp.net 2?

I need to store information related to every user, when user login till user logout. Is there alternative of session in web.api asp.net. Or there is better approach for implementing this.Scenario [ WEB...

View Article

Best Security Practices for Web APIs

My question is not about securing Web APIs (adding Authentication and the like), but more about the questions a Security Expert would pose. For example, how to prevent someone from discovering API...

View Article

Web API - 404 Error

Web API Controller:[EnableCors(origins: "*", headers: "*", methods: "*")] public class HomeController : ApiController { private HomeDataProvider homeDataProvider = new HomeDataProvider(); // GET...

View Article


Only allow specific web site to call web api

Suppose I have my web api A.Suppose I have my angularjs B.A contains method which is very critical and must only be called by B.What is the easy and secure way to allow method of A to only be called by...

View Article


How to create a Login Web Api for different mobile user to login

Hi I m a newbie in Web Api.say I have create an asp.net MVC app to register a user with username and password.Which web service I should use for iOS/Android/Xamarin user to login?I m a bit confused as...

View Article

Google analytics API

Hello Everyonei want to implement google analytic API in my web application. if a register user enter his website link and other credentials  application show statistics of his website. The problem is...

View Article

Automatically expand related entity with OData Controller

Hello,I'm writing an API to allow a supplier to connect to us. They've specified how they want it.For one part they want a GET action for Items. An Item has a colletion o f prices in it.Normally I woul...

View Article

How can I change this JSON output

I am using a very simple webapi as follows [HttpGet("{orderId}")] public IEnumerable<object> Get(string orderId) { var ohRows = from oh in _context.oh where oh.OrderNumber == orderId select new {...

View Article


How can I re-write this filter expression to support an AND operator across...

Hello, I have a model that is returned over an endpoint /brands that looks like this{ Count : int , Items: [ Name : string , Tags : [ KeyId : guid , Name : string ] ] }When I use an ANY filter...

View Article

open postman json response url in chome

Hi All         I testing my API in Postman. My question is it possible to open postman  json response url in chome?   if  possible  how?

View Article


Return Type from POST Method

Hi,I have a POST method in my controller.  This method has a return type of void. Should I be usingIHttpActionResult as the return type? I am looking to find what is best practice.Should my repository...

View Article

Retrieve data from api

Hi,I'm new to web api. I wanted to post data to external api and retrieve result. Can I do that using web api. I know If I use soap web service I can retrieve data from external parties. Is web api...

View Article


not executing [HttpPost]

Hi,I am trying to insert data using stored procedure in Web API.[HttpPost] is not getting executed [HttpGet] is working within the same controller.Controller code[HttpPost] public IHttpActionResult...

View Article

Web API 2 return custom error object

Hello,I've searched this intensive but can't get it to work.I've haven an Web AP2 OData API and need to return a custom error class.Here is what I have:public class Error     {        public string...

View Article

Returning large amount of data from server to be used on different screens on...

I am working on an api that needs to support a mobile phone application, and I am working with existing code that feeds data to the api's that cant be modified.  Also the phone application is supposed...

View Article
Browsing all 4850 articles
Browse latest View live


Latest Images

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