How to secure ASP.NET Web API using basic authentication

secure ASP.NET Web API using basic authentication

ASP.NET Web API allows us different ways to implement security while exposing resources. In previous article we have learned about how to secure ASP.NET WEB API using token based authentication. In this article we are going to learn how to secure ASP.NET WEB API using basic authentication. Basic Authentication is easy to implement, expose and consume and is widely supported by any Web client, but it’s not as secure as token based authentication and it requires that SSL(Secure Sockets Layer) is used to keep the encoded credentials in order to safe application from simple attacks. Implementation of ASP.NET Web API Read More …

Share Knowledge

How to secure ASP.NET Web API using Token Based Authentication

secure ASP.NET Web API using token based authentication

Introduction : Whenever we work on enterprise level application either application based on web or windows platform the first biggest concern come in our mind is its security. When requirement is to expose our business services to client then securing those services is on top priority. Just because we’ve built a WEB API that we want to make it public, it doesn’t mean that we allow anybody accessing it and consuming our services without any proper validation. Nowadays adoption of WEB API is increasing at expeditiously pace so it is highly recommended for developer to implement security for all types Read More …

Share Knowledge

How to solve Validation Of Viewstate MAC Failed error in ASP.NET

Validation Of Viewstate MAC Failed

If you are looking solution for one of the weird error “Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.” I can feel your pain. Few days back I was on same position where you are standing now. I was stuck and clearly had no Idea why application getting this error on only some pages where whole application was working fine.

Share Knowledge

A Basic Introduction of how to write Unit Test in C# for beginners

Unit Test

Introduction In this article you will have basic introduction of Unit Test and will learn how to write “Unit Test” in C#.  Writing test case is an inevitable part of software testing. Testing software is a real challenge, because there are so many types of test cases that come in so many different shapes and sizes. In order to learn how to write good Unit Test, we must first understand as to what is Unit Test and why do we need it. So lets learn that first.

Share Knowledge