Click here to Skip to main content
15,890,438 members
Everything / API

API

API

Great Reads

by Shenwei Liu
A complete sample application using AngularJS, trNgGrid, ngTable, and ASP.NET Web API to access and display data with server-side data filtering, sorting, and paging.
by Bruno Tabbia
Automatic positioning and resizing of explorer windows, without overlapping (for obsessive superusers)
by Mathew Soji
This tip guides through implementing a basic REST based Web API service with multiple GET methods and its consumption using JQuery client
by Sheshnath Kumar
This article will find out a solution to serialize/deserialize object by reference at server and client, also will serialize/deserialize objects having circular references.

Latest Articles

by Fred Song (Melbourne)
A responsive React frontend interacts in real-time with a .NET 8 Minimal API backend to dynamically display and manage state transitions for a simulated traffic light system.
by Dev Leader
Access Google Sheets via C#; Start simple, optimize later!
by Nicolas DESCARTES
How to build a GraphQL API with HotChocolate?
by Pawan Kumar from CodewithPawan.com
Explore the seamless integration of @ngrx/translate with an Angular standalone API in this comprehensive guide, ensuring a smooth translation workflow for your applications.

All Articles

Sort by Title

API 

28 Feb 2021 by OriginalGriff
We can't help you: a 404 error means what the message says - you have asked for a page that doesn't exist. It is unlikely to be that code that generates such an error ... But ... don't do it like that! 1) Never concatenate strings to build a...
28 Feb 2021 by Member 15081437
how to fix error "the remote server returned an error (404) not found". in asp.net c# What I have tried: public HttpResponseMessage get(string s, string p) { DataSet dt = new DataSet(); string query =...
16 Nov 2017 by Member 13524844
Try to call webapi using asp.net . while calling javascript function by onclick event from client side .it is not working with below code Please give me solutions for this. What I have tried: // document.getElementById("button1").onclick = function () { myFunction() }; ...
16 Nov 2017 by Karthik_Mahalingam
you have declared Eid and Epwd inside the button click event and you are trying to access the variables inside another method, so the value will be undefined and moreover in the data attribute of the ajax method you are passing only one parameter make sure you are passing all the values. pass...
8 Jan 2013 by Member 7857575
Recently, I get a problem in one of my Win32 applications. The application calls CreateEvent with a unique string, to determain whether another instance of the application is already running. Then the application exits if the call’s GetLastError() == ERROR_ALREADY_EXISTS. It works as expected...
9 Jan 2013 by H.Brydon
A very thorough treatment of the whole subject can be found here[^] in an article by Jeff Prosise (who I have a great deal of respect for). The article is a bit old but the answers are still relevant.If you are using VS2008 or greater, you can apparently go to the project properties and...
24 Nov 2014 by itsathere
public HttpResponseMessage Delete(string strApiKey){ string strDomainName = PageUtility.GetCurrentDomainName(); HttpClient client = new HttpClient(); client.BaseAddress = new Uri(strDomainName); // Add an Accept header for JSON format. ...
19 Jun 2021 by eweqee
I am developing .net core and angular web application. In this solution, we are calling the database using another class library in .net 5. So, When it coming to create a connection It says below Error: " 'System.Data.SqlClient' wasn't found...
19 Jun 2021 by NightWizzard
It's not a solution by code - you have to use the nuget manager in Visual Studio to add the reference.
18 Jun 2021 by NightWizzard
I had the same problem - reason: with NET 5 the SQL client library isn't included by default. You habe to install it first with the nuget manager and for NET 5 it's no longer located in the main namespace "System" but in "Microsoft".
31 Oct 2022 by Member 10252017
Model: public class ClientSetupDto { public byte Status { get; set; } = 0; public string ClientName { get; set; } public string ClientId { get; set; } } API Request: [HttpPost] ...
U 30 Apr 2024 by Fred Song (Melbourne)
A responsive React frontend interacts in real-time with a .NET 8 Minimal API backend to dynamically display and manage state transitions for a simulated traffic light system.
2 Jan 2021 by TheBigBearNow
Hello all, I currently have 2 separate projects, I have an API for the backend with CRUD and login functionality, I also set up Json Web Tokens on the backend for validation purposes. I have a front end MVC project which I am using for my UI. On...
8 Apr 2020 by Member 12613458
Deployed a sample(out of the template while we create WebAPI) on Win Server 2012 [Route("api/[controller]")] [ApiController] public class ValuesController : ControllerBase { // GET api/values [HttpGet] public...
20 Nov 2015 by Mohamed Amine SEBBANE
Localization of .NET assemblies in the cloud and translation
5 Apr 2016 by neualex
Hi folks,Quick question, is there any other open-source .net libraries out there similar to ScrapySharp which can handle web session IDs and browsing thru pages?I'm trying to scrape data from Maryland Case Search web app by submitting form post and scrape results, but results span...
27 May 2020 by Maciej Los
Not enough description of issue to post short answer. Refer this: How to Fix the 400 Bad Request Error[^]
10 Jun 2014 by Deepika_Thakur
I am using oauth API with my Asp.net project and getting 404 error when I am trying to integrate my LinkedIn account to my site. It was working fine till yesterday but now I am unable to integrate my LinkedIn account.This are the links of API I am...
10 Oct 2017 by xXxRevolutionxXx
I am creating a ASP.NET MVC web site and as the title say i am trying to send a POST request to Web Api controller with jquery, but am always receiving a 404 error. The crazy thing is that in the .NET framework 4.5 the exact the same thing worked, but in the .NET framework 4.6.2 it really...
6 Sep 2017 by Graeme_Grant
404 is "page not found". You are looking for a route that does not exist. As "j snooze" mentions, as part of the debugging of routes, try it manually. Also, use the Web Browser debugging tools and check the actual raw conversation to see if the URLs being called are in fact what your route table...
6 Sep 2017 by koklimabc
$.ajax({ url: "/api/cart", type : "Post", data: $(this).next().val() }); window.location.href = "~/Login/Account"; Backend code private ApplicationDbContext _context = new ApplicationDbContext(); private...
10 Oct 2017 by Bryian Tan
Did you check the Cross-Origin Requests (CORS) setting? I'm guessing, this is the error the application is throwing when invoking the API through jQuery AJAX request. HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier). XHR OPTIONS ...
28 May 2020 by Eliza Maria
I have a login method where I am trying to pass a token into the header along with the credentials and the format "application/json" but unfortunately I am getting a 415 unsupported media type and I don't understand why.I understand the fact that...
22 Apr 2022 by Chris Maunder
Adding AI to your applications doesn’t have to be all about fighting the tools and libraries
19 Feb 2017 by Imran Abdul Ghani
In this MEAN Stack tutorial, we are going to develop a RESTful API using Express.js and MongoDB.
8 Oct 2014 by Fail4FunTV
I am using a MacVendorLookUp API from this site: http://www.macvendorlookup.com[^]Error:"An unhandled exception of type 'System.Net.WebException' occurred in System.dllAdditional information: The remote server returned an error (407) Proxy Authentication Required."Error in...
8 Oct 2014 by Suvabrata Roy
Hi,You Need to provide credentials of your proxy server with the request.Example : http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.credentials(v=vs.110).aspx[^]Get default Proxy :...
10 Jul 2013 by havilove
Im trying to make a plugin for Age of Empires (AOE). I want to display a message on screen of game when im playing I think must use SetWindowsHookEx and draws overlay in response to WM_PAINT messages. But im not strong with Hook. Im searching for a simple code snippet which can help me draw a...
19 Sep 2020 by Don Kackman
An easy to use Rest client using the Dynamic Language Runtime
22 Oct 2022 by Kenji Elzerman
A walkthrough to create and run a minimal API with .NET 6 using C#
3 Mar 2013 by SVPro
Hi all,I want to write a program can set windows title of other programs before it's opened. For ex: I used my program to selects Notepad and open it, when it opened, notepad's title was changed.how can I do it with C/Win32/API?I knew that SetWindowText can change title, but it only...
5 Mar 2013 by Mahdi Nejadsahebi
hi my dear friendgood ideait's easy to doi know this algorithm with visual c++ (MFC)at first you have to determine when the notepad program is opened.to do this you have to use Timer object or event.add this event into your project, and in the OnInitial() event you have to run...
5 Mar 2013 by «_Superman_»
Use the CreateProcess API to start the application.In the STARTUPINFO structure passed into CreateProcess, hide the window using the STARTF_USESHOWWINDOW and SW_HIDE flags.After CreateProcess succeeds, you will get the handle to the main thread in the PROCESS_INFORMATION structure.Use this...
23 Jul 2013 by Nakx95
Hi every one ,i'm new here and this is my firt question...Is there anyone who knows an api a web service an aplication or some surce code that trough a simple word fuonds all relate and existing internet urls ?Thanks in advance and excuse my english.
23 Jul 2013 by Thomas Daniels
Quote:Is there anyone who knows an api a web service an aplication or some surce code that trough a simple word fuonds all relate and existing internet urls ?Yes: Google!And to perform a Google search in C#, you can use Google Search .NET - API for Google Services in C#...
18 Mar 2012 by rerefrancd
function doSend(formTag,linkurl,func){ var msg=""; var reciver="";  var postData=""; var inputTag = formTag.all.tags("input"); for (i=0;i
19 Apr 2016 by Bhuvanesh Mohankumar
When we access the WEB API service methods from a web application through Ajax calls, will there be any access restrictions for the following scenarios“HTTPS” Web application accessing an “HTTP” WEB-API “HTTP” Web application accessing an “HTTPS” WEB-APIWill there be any impact on...
19 Apr 2016 by Richard Deeming
A page served over HTTPS should not be able to access an API served over HTTP, as this would not be secure.A page served over HTTP will be able to access an API served over HTTPS.However, this is unlikely to be the problem. It sounds like you're trying to access an API which does not...
16 Jun 2014 by Manish Kumar Namdev
Hi Friends,I am new to web api. I have created a sample project of WEB API and MVC 4 APP together. Now when I try to make a request as follows I get the error:#jQuery code.function GetAllEmployees() { jQuery.support.cors = true; console.log("Entered to GetAllEmployees"); ...
16 Jun 2014 by Kornfeld Eliyahu Peter
The problem is about same-origin policy[^]. It means that you can not make such call from one domain (localhost:51789) to other domain (localhost:51848).You may set crossDomain to true on $.ajax, but the only certain solution is set Access-Control-Allow-Origin header on your target domain.It...
16 Jun 2014 by Akhil Mittal
Add the below code in your web.config of your API under tag
16 Jun 2014 by wladimirbm
if you want use only jQuery, you can create file.php with curl for you other pathin localhost:51789function GetAllEmployees() { jQuery.support.cors = true; console.log("Entered to GetAllEmployees"); $.ajax({ url: 'http://localhost:51789/EmployeeAPI.php', ...
17 Mar 2018 by Promis Patel
Hello friends, I am facing "Access Control Origin not Allowed" issue in web application. And am using Thomson API and SaveImage API Call then after generate this type issues. Am using Thomson API + visual studio 2015 + Web application When am using Simpel HTMl file and using this process...
28 Feb 2018 by Member 10991353
have api_key, secret and I have to hash the signature to sha256. The signature = api_key+secret+utctimestamp. I am using Crypto.Js for hashing. I am getting following errorXMLHttpRequest cannot load "HOST LINK". No'Access-Control-Allow-Origin' header is present on the requested resource....
28 Feb 2018 by manik arora
Try converting the hash as base64 string like below- var hash =...
17 May 2018 by Chillin92
Currently, my project is using Hmac-SHA256 to do the authorization in APIM. We are struggle with how to generate, transmit and store the secret key between client side and ours. Is there any secure way to do this? What I have tried: For now, we are generating the secret key through openssl...
23 Jan 2017 by jugs0101
Hi,Have inherited some code that is trying to find a Javascript API that is already in a browser, from a Winforms application all running on a local user's Windows PC. The browser could be either Chrome or IE (we only say we supprt these 2). We don't necessarily have control of the web page...
2 May 2015 by Sowjanya49183
I have created as web api HttpResponseMessage with http error object. Ex:actionExecutedContext.Request.CreateErrorResponse(HttpStatusCode.Unauthorized, new HttpError { ExceptionType = "102", ExceptionMessage = "Unathorized Exception", Message =...
20 Aug 2021 by DougSchofield
I am new to ASP.net. My experience has been on winforms using VB.net, and I have been struggling with my first api call. I am using VS 2019. I spent a few hours researching but couldn't find what I need. I want to upload a file to a web api and...
20 Aug 2021 by DougSchofield
This helped... c# - How to set up a Web API controller for multipart/form-data - Stack Overflow[^]
6 Aug 2012 by Duy Dam
Hi,I am trying to use Google APIs Client Library to develop a Chrome Extension. The problems is that I cannot inject this script in background page to access the API:Debug in Chrome throw an...
24 Feb 2013 by Jaffar Hussain
add this to your manifest file , it will work fine"content_security_policy": "script-src 'self' https://apis.google.com; object-src 'self'"
14 Mar 2013 by johngorman1
I have a Google maps api v2 incorporated into my app to provide an activity with a map fragment but I cant find relevant code to add a default location marker.For example when the activity is loaded it will be centered on a street with a marker,eg Old Trafford Stadium,Manchester.I have activated...
14 Mar 2013 by Yvan Rodrigues
Do you mean a default image for the marker, http://econym.org.uk/gmap/custom.htm[^]or the default place the marker should be?There's no such thing -- you have to manually add each one.
16 Mar 2016 by VISWESWARAN1998
Sir, I have created a list box in Win32 API like this// list1 is HWND variablelist1 = CreateWindow(L"LISTBOX", NULL, WS_CHILDWINDOW | WS_VISIBLE | LBS_STANDARD,10,150,330,200, hWnd, (HMENU)ID_LISTBOX,hInst, NULL); It does created successfully. To avoid confusion I've used several...
16 Mar 2016 by CPallini
declare your variable as extern in a header file, e.g.// mylist.hextern HWND hwndMyList;define it in just one source file, e.g.// mylist.cpp// ...HWND hwndMyList;// ...include the header file in all the other sources needing the variable// foo.cpp#include...
13 Aug 2013 by Sicppy
How do I add type filters to a .NET Dictionary so that the TValue will be a class object that inherits my EventListener interface? So for exampleDictionary events = new Dictionary(); //where object would have to inherit EventListener
13 Aug 2013 by Zoltán Zörgő
Look at following sample:interface I {};class a : I {};class b : I {};class c {};void Main(){ Dictionary x = new Dictionary(); x.Add("a", new a()); x.Add("b", new b()); x.Add("c", new c()); //will fail}
8 Feb 2012 by creizlein
I have been facing some issues lately with Pinvoke calls to native functions of advapi32.dll from managed code and i haven't found yet a way to make it work properly, facing multiple problems related to the classic "A call to ... has unbalanced the stack" and "attempt to read/write protected...
8 Feb 2012 by Dave Kreskowiak
The biggest culprit of "A call to ... has unbalanced the stack" is you declared a type as Long instead of Integer. This is very common if you used a Declare you found on the internet and it belongs to VB6 code.A Long in VB6 is a 32-bit signed integer. A Long in VB.NET is a 64-bit signed...
20 Aug 2018 by manishitvt
I m new to adword api i have setup all the account and have all the credentials need to make a api call. i have developerToken,clientCustomerId,clientId,clientSecret but the api lib is too complicated for me(PHP lib) is there a way to get data in json format like we do for other calls like i...
4 Feb 2019 by Member 14138754
Hello, please help me. i am new in JS and need help for a response Array: In the following URL are 5 eMails. what is the correct way to get all emails from the 5 objects from: var root = "https://jsonplaceholder.typicode.com/comments"; In my Code i get only the first email: What I have...
4 Feb 2019 by Richard Deeming
You only get the first email because you're only looking at the first record. You need to loop through the returned array to look at each record in turn. For example: success: function(response){ $.each(response, function(index, item){ var postId = item.postId; var email =...
13 Mar 2017 by ujjwal uniyal
i am calling an api on click of a button. the issue is that the code works as expected in crome while it doesn't in firefox. I checked that there is no error in console in firfox.Intresting thing is that if i have firefox develper tool opened in the browser then the request is hitting the...
4 Dec 2016 by KyLim0211
$(function () { $('#btnUsingjQuery').click(function () { $.ajax({ url: "http://api.google.com/payment/widget?apikey=xxx&country=RS", dataType: 'json', success: function...
4 Dec 2016 by Afzaal Ahmad Zeeshan
A few things to note here, first of all use the following type for script, But this is not necessary at all now, browsers are smart enough. You can always omit this and it will work. Secondly, jQuery code needs to come inside a handler otherwise $ won't...
2 Jul 2016 by Alviss_H
I'm starting on a project to research about the algorithm of Youtube to check the license for videos.About the demo, I will use C# to create the tool. This is a small tool, with MSsql to store the DB(videos) and 'user' who can upload video. The tool will be checked it and reject it if this...
2 Jul 2016 by OriginalGriff
We can't help you with this: the code is proprietary to YouTube and so only they can legally give you any information.You could try contacting them - YouTube Contact Us[^] may help, they may be willign to give you info. Since it's a project, they might - but I wouldn't bank on it.
1 Jan 2020 by syed shanu
How to create a simple CRUD application for ASP.NET Core Blazor using Visual Studio 2019, .NET Core 3, Entity Framework and Web API
22 Feb 2016 by Mr.Yoga445
I have situation to integration AMAZON APP STORE API on my web pages where by user type any keyword on my webpage and it search on AMAZON APP STORE database through API which is free to use and show the result on grid view with apps or games etc on my webpage.What I have tried:am unable...
22 Feb 2016 by CHill60
This is very similar to your previous question and you are asking in the wrong place.Amazon Services & APIs - Amazon Apps & Services Developer Portal[^] would be a better place to start.This post also has some useful information in the answers android - How can I do an Amazon App...
17 Sep 2016 by Sarah Mohammed77
app.config program.cs static void Main(string[] args) { // Instantiate Amazon ProductAdvertisingAPI client AWSECommerceServicePortTypeClient amazonClient = new AWSECommerceServicePortTypeClient(); // prepare an ItemSearch request ...
17 Sep 2016 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Check the same code here - Product Advertising API Signed Requests Sample Code - C# REST/QUERY : Sample Code & Libraries : Amazon Web Services[^]. Refer this.
23 Mar 2011 by Bathula.Sreekaanth
Hi, I need to know the number of "IO read bytes" of an application. There is an API GetProcessIoCounters(). But it requires new SDK than I'm using. Please suggest an alternative for GetProcessIoCounters()?
30 Mar 2022 by hemanth sravan
There is an APi1(master) which will randomly select number 2 or 3. If it is 2 it should call api2 and if it is 3 it should call api3. API1 should not wait for the response from api2. It should call api3 immediately .Once after the specific task...
15 Dec 2021 by Member 15028314
I like so many other developers, develop useful tools which could be contained within these windows DLL files. But the question is; how can we(as developers) add our own new software API's up under our MS Visual Studio environment(s), so we can...
15 Jul 2012 by satrio_budidharmawan
Hi guys,I'm currently working on android project, that lead me to this sh*t :I used HTC Inspire 4G with :- Android Version 2.2.1- Kernel version 2.6.32- Build Number 1.80...- and else should be known by google -_-My question is : How to install .apk with manifest...
30 Mar 2018 by Joe Doe234
Hi guys, im trying to get data from AN API Called spoonaculari. And the android studio is giving me an error (given under the code) try { HttpResponse response =...
17 Jul 2016 by Andy Point
Android Flash Light Application Tutorial Using Camera2 API
16 Jun 2018 by Member 13875491
I have made a login api which will return an id when i pass username and password in android app. public class LoginApiBody { public string UserName { get; set; } public string Password { get; set; } } Say the link is http://abcd.org/efg/login. Currently the link is showing: { ...
10 Mar 2019 by Fred Song (Melbourne)
Angular 7 with .NET Core 2.2 - Global Weather (Part 2)
27 Nov 2014 by ThilankaIshara
i'm building and Application using MVC 4 and AngularJS.there is a that display list of data that queried from database using AngularJS I want to Update data that displayed date inside when a record update/Add/delete from database.I tried using a refresh method that reload data...
23 Apr 2015 by RajKGoel
This tip is targeted towards learning the basics of Angular JS, using it with ASP.NET Web API.
10 Dec 2017 by syed shanu
In this article lets see in deep on how to work with WEB API, EF for performing a Inventory Management priority based Reorder level system CRUD operation using Angular5 and ASP.NET Core application
28 Aug 2015 by Bert O Neill
AngularJS and Web API Active Directory Security (Authorisation)
15 May 2019 by Han Bo Sun
In this tutorial, I am going to discuss how ngResource works. I will demo all 4 HTTP verbs (or methods), and multiple ways request input data can be packaged. It will be a very fun tutorial.
6 Oct 2014 by Afazal MD 3104209
AngularJS integration with Web API explained with a product list and added new product with get and post method.
15 Oct 2015 by Madhusudan K Moorthy
Hi,can someone provide full code for implementing anti forgery in web api?Thanks
15 Oct 2015 by ZurdoDev
No, no one will hand you all the work you need to do. I suggest searching google for some examples and then if you get stuck on something specific, please come back and show us where you are stuck and we'll gladly help.Here is one example....
15 Oct 2015 by Krunal Rohit
Umm, refer this[^] (About 24,400 results (0.22 seconds) :laugh:)-KR
2 Feb 2021 by viprat
I have implemented Anti Forgery token with Angular 6. i am facing some issue after implementing that. i am able to validate token using [Validateantiforgerytoken] for fist time in POST request. But in sub sequent POST request we are getting 400...
2 Feb 2021 by pham ngoc hoa
I'm facing the same issue. Did you have any solution for this issue? Thanks for advance.
9 Feb 2012 by pckola
Hi,I was searching for any Swift API for swift message creation and parsing. Did not find any open source one. I was looking something similar like Swift WIFE Api for JAVA.Please let me know if any information about the API. ThanksAny ideas of creation of swift message would be great, as...
9 Feb 2012 by Espen Harlinn
Have a look at IKVM[^]Let's you use java libraries on the .Net platform.Best regardsEspen Harlinn
9 Feb 2012 by Sergey Alexandrovich Kryukov
Just for completeness, to complement the answer by Espen:There are also: J# by Microsoft, available but discontinued:http://en.wikipedia.org/wiki/J_Sharp[^],http://msdn2.microsoft.com/en-us/vjsharp/default.aspx[^].Ja.NET: http://www.janetdev.org/[^].—SA
27 Sep 2019 by Member 13438975
Any FREE XML News Feed API for Compatible with C# What I have tried: I want a free API to call the breaking news in EGYPT here and I hope to be free if you can POST me an idea; any free XML API for news please help!
27 Sep 2019 by RickZeeland
Trawlingweb offers a free plan: trawlingweb.com[^] News API looks interesting too: C# client library - News API[^] It does not offer XML, but should not be difficult if you use their library calls.
21 Mar 2018 by Maddy_1008
Any one have any information about free weather api? to use it on asp.net mvc website. I want to show weather information on my website. Please let me know if you have any idea regarding this, please reply. Thanks What I have tried: I have checked lot of weather apis but its free on trial...
21 Mar 2018 by R. Giskard Reventlov
Try this: AnyAPI[^]