Skip to main content

Posts

Showing posts with the label Web APIs

Deploying asp.net core application on docker using Microsoft Azure Infrastructure Part - 1

There are several ways to deploy the Linux based asp.net core application in azure infrastructure, Microsoft Azure Web App - (Linux Infrastructure) Microsoft Azure Web App for Container Microsoft Azure Container Service Microsoft Azure Container Instance (Currently in Preview) In this series we are exploring the Microsoft Azure Web App - (Linux Infrastructure) option to deploy our asp.net core application. If you are new to docker or very basic theoretical knowledge of the docker based container deployment, than it's right choice for you to deploy application on Microsoft Azure Web App in Linux Infrastructure cause most of the docker based tasks are handle by the Microsoft Azure like create, build & run image for docker. We don't even write single docker based configuration on our ASP.NET core project. Now let's create the our first application using ASP.NET Core 1.1 SDK , and run locally to verify it's running correctly or not. If everything is okay than we going...

ASP.NET Web (REST) API Best Practices - HTTP Verb

In our ASP.NET Web (REST) API Best Practices series, today we are going to talk about the HTTP Verb like POST, GET, PUT etc. Every verbs have specific meaning for it's associate requests. for ex. GET Use when fetching records or data from APIs. POST Use when adding records or data in APIs PUT Use when updating records or data in APIs DELETE Use when deleting records or data in APIs We covers CRUD scenario with Web APIs. we never compromise above standard like GET requests must not change any underlying resource data. In advance scenario we may requires below verbs as well PATCH Use when partially updating the records or data in APIs (Ex. only update email address properties) HEAD Use when calling APIs without needing the response data in return. Ideally use for health checking API Here is my list of HTTP verbs and their use cases, what's yours?

Windows Authentication using IIS Express with ASP.NET Core Web API

Microsoft has already written good detailing article on windows authentication with Web API, I recommended to go through that articles which explain various ways to implement windows authentication with ASP.NET Core Web APIs. Here i'm going to cover about how to setup the windows authentications with ASP.NET Core Web APIs using IIS Express and consuming secure APIs via ASP.NET Core MVC Web apps. Once you setup the Web API project mention in articles in IIS express sections , few more steps to follow in order to securing the APIs using windows authentications. Update web.config file with below sections <?xml version="1.0" encoding="utf-8"?> <configuration>   <location path="." inheritInChildApplications="false">     <system.webServer>       <security>         <authentication>           <anonymousAuthentication enabled="false" />           <wind...