background preloader

WebAPI

Facebook Twitter

Download JSON Viewer 1.19v Free - Explore the JSON tree view. Rest to Excel library - Excel Liberation. RESTful queries - what are they ?

Rest to Excel library - Excel Liberation

Well you can read the detail here, but in simple terms, you provide a URL including a query and some xml or jSon is returned containing the response. The objective of this cRest class is to provide a simple way to do that and populate excel with the results, and of the library is to create a repository for frequently used Rest query and response details you can build into any projects that might need to retrieve such data. What does rest query look like Here is a query to return a page of tweets about excel and the beginning portion of the result (it's too long to reproduce the whole thing here) looks like {"completed_in":0.181,"max_id":138606689405501441,"max_id_str":"138606689405501441","next_page":"?

What has this to do with Excel? Well it would be nice if you could just populate a sheet with the results of such queries without worrying about the details. This is how simple it is Public Sub testTwitter() generalQuery "tweets", "twitter", _ End Sub. JSON Editor Online - view, edit and format JSON online. Attribute based routing in ASP.NET Web API. Routing is the key aspect of every MVC application – after all, it’s how people get to your application, and how search engines see it.

Attribute based routing in ASP.NET Web API

As flexible as routing in ASP.NET MVC has been, one would often end up in frustrating situations where more flexibility was needed (or you simply started getting lost in a maze of routes). One of the finest extensions to ASP.NET MVC I have ever worked with is the excellent library AttributeRouting by Tim McCall. Last month, through the great work of Kamran Ayub, the library has been extended to support ASP.NET Web API, and is now available on NuGet. Let’s have a look at how it can immediately make your life easier and drastically improve the way you handle your routes. Getting the appropriate stuff from NuGet. Kendo UI Blog Posts > Ask Kendo UI – Server Side Sorting With WebAPI. Kendo UI Blog Posts > Hello Services / WebAPI, REST, JSON and AJAX.

ASP.NET MVC 4 RC Web API ModelState error for optional url parameters which are nullable. Passing multiple POST parameters to Web API Controller Methods. ASP.NET Web API introduces a new API for creating REST APIs and making AJAX callbacks to the server.

Passing multiple POST parameters to Web API Controller Methods

This new API provides a host of new great functionality that unifies many of the features of many of the various AJAX/REST APIs that Microsoft created before it - ASP.NET AJAX, WCF REST specifically - and combines them into a whole more consistent API. Web API addresses many of the concerns that developers had with these older APIs, namely that it was very difficult to build consistent REST style resource APIs easily. While Web API provides many new features and makes many scenarios much easier, a lot of the focus has been on making it easier to build REST compliant APIs that are focused on resource based solutions and HTTP verbs. MVC 4 WEB API .NET 4.5 in C#, JavaScript for Visual Studio 2012.

MVC 4 WEB API .NET 4.5. We can expose a Web API from ASP.NET MVC4.

MVC 4 WEB API .NET 4.5

It is a new feature from Microsoft. Clients can get data from a Web API in any format such as JSON, XML, JSONP, HTML and etc. I have already written about the Web API based methods in the blog. Using the URL Rewrite Module : URL Rewrite Module : Installing and Configuring IIS. About the URL Rewrite module The Microsoft URL Rewrite Module 2.0 for IIS 7 enables IIS administrators to create powerful customized rules to map request URLs to friendly URLs that are easier for users to remember and easier for search engines to find. You can use the URL Rewrite module to perform URL manipulation tasks, some of which include: Define powerful rules to transform complex URLs into simple and consistent Web addresses.

Easily replace Web application URLs to produce user and search engine friendly results. Rewrite URLs based on HTTP headers and IIS server variables. Perform redirects, send custom responses, or stop HTTP requests based on the logic expressed in the rewrite rules. How to consume ASP.NET Web API RC with RestSharp? As I mentioned in my blog before that ASP.NET Web API will be the next generation of WCF for creating RESTful web service which can be consumed by any platforms or devices supporting HTTP protocol.

How to consume ASP.NET Web API RC with RestSharp?

It is a part of ASP.NET MVC 4 , can be installed on Visual Studio 2010 or Visual Studio 2012 and is currently on Release Candidate version. It’s first time that I try a RC product in my software and I had really a lot of troubles: - There are breaking changes from Beta version to RC version which causes a lot of things not work anymore. - The Castle Windsor (an Inversion of Control container) runs unstably with ASP.NET Web Server because of his error “Could not load file or assembly…” and I do have to stop debugging, stop ASP.NET Web Server and start again each time when an exception was thrown or when I stop debugging at any position in source code. - The Inversion of Control container must be attached with new code when changing from Beta version to RC version. - Lack of documentation.

. … How should I pass multiple parameters to an ASP.Net Web API GET. ASP.NET MVC 4 WebAPI. Support Areas in HttpControllerSelector. Json.NET - Quick Starts & API Documentation - Table of Content. MVC 4. A simple POC using ASP.NET Web API, Entity Framework, Autofac, Cross Domain Support. Download Application.zip Download packages.zip Download AdventureSite.zip or Download CodePlex Introduction.

A simple POC using ASP.NET Web API, Entity Framework, Autofac, Cross Domain Support

Implementing CORS support in ASP.NET Web APIs - Carlos' blog. This post was written for the Beta version of the ASP.NET MVC 4.

Implementing CORS support in ASP.NET Web APIs - Carlos' blog

The updates needed to make them run in the latest bits (Release Candidate) are listed in this new post. The code in this post is published on the MSDN Code Gallery. By default, a web page cannot make calls to services (APIs) on a domain other than the one where the page came from. This is a security measure against a group of cross-site forgery attacks in which browsing to a bad site could potentially use the browser cookies to get data from a good site which the user had previously logged on (think your bank).

There are many situations, however, where getting data from different sites is a perfectly valid scenario, such as mash-up applications which need data from different sources. ASP.NET MVC 4 public beta including ASP.NET Web API. Today Microsoft presented and released ASP.NET MVC 4 Beta at TechDays Belgium.

ASP.NET MVC 4 public beta including ASP.NET Web API

To me personally the most important improvement is the integration of the WCF Web API into the ASP.NET Stack. One of the main reason for merging both has been the question “why two frameworks from Microsoft which allow us to create ReSTful APIs?” Thus, the ASP.NET MVC developers now get the goodies from the WCF Web API.

Everything new? Let’s take a look at how we do things now. The most important change is the implementation of our own APIs themselfes: Asp.net - How can I extend the content negotiation behavior in MVC4. Absolute Url in Asp.net webapi. Asp.net mvc 3 - Route broken under MVC3. How do I set the default namespaces in MapHttpRoute?