Skip to main content

Posts

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" />           <windowsAuthentication enabled="true" /&

ASP.NET Web (REST) API Best Practices - Resource Naming Convention

In our ASP.NET Web (REST) API Best Practices series, today we are going to talk about the Resource naming. This is most important concept in designing the REST API Endpoints, It's like designer who design UI for their applications. Similar way REST API developer need to design their endpoint in way that consumer of API (developer, end user) can easily predict API Endpoints without much reading API documentations and easily integrate in their applications. So, How we design the API which are predicative and same time easy to integrate?  Well, we need to identify resource of services, and we need to exposed those services resource via endpoints. We need to identifying the resources within the system and need to expose them as nouns, not as verbs or actions. what is that means? let's understand with help of the example. Suppose we need to design the endpoints for Leaning System which have following entities, Student Teacher Course and we need to expose above resources in services

ASP.NET Web (REST) API Best Practices

As we know that service based architecture became mandatory in every solutions since last couple of years. Because of industry needs, i also get chance to develop application which follow service oriented architecture using ASP.NET Web APIs. I'm sharing my experience about what need to be consider while designing & developing REST service. I believe following any standards in software engineering is an iterative process, which always requires constant modifications on define standards and practices. So, i listed out points which i follow and i also keep updating below points from time to time. HTTP Verb Resource Naming Convention Request Response Representation & Format

CI/CD with Service Fabric using Visual Studio Online

We are going to automate our build and deployment process with Visual Studio Team Service for microservices which is develop in Azure Service Fabric Framework . We cover following steps for CI/CD with Visual Studio Online, Create build and published artifacts with each checked-in Release artifacts while new build available with Pre-deployment approvals Create a build definition Logged-in to the Visual Studio Team Service and go to the Build and Release tab, then clicking on the New button from page which showing several templates for generating build. we select Azure Service Fabric Application template from available options After clicking on Apply button, Visual Studio Team Service automatically generate tasks which requires to build Service Fabric Application. But VSTS wants some inputs from us for Agent queue field, we select Hosted VS2017 option to build our Service Fabric Application. From Triggers tab, we enable continuous integration option. Now we are g