Posted by Anuraj on Sunday, November 3, 2013 Reading time :2 minutes
.Net ASP.Net ASP.Net MVC Web API
In this post I am going to show how to implement Basic HTTP authentication in a Web API project by customizing AuthotrizeAttribute. HTTP authentication is a standard protocol and can be easily handled by most popular client and mobile platforms.
Posted by Anuraj on Thursday, October 31, 2013 Reading time :1 minute
Posted by Anuraj on Tuesday, October 8, 2013 Reading time :1 minute
.Net .Net 4.0 ASP.Net MVC
Broadcasting a message from SignalR hub is pretty straight forward, but sometimes you may need to do the same from outside the hub, like from MVC controller or a Web Page.
Posted by Anuraj on Wednesday, October 2, 2013 Reading time :1 minute
.Net Team Foundation Server Version Control Visual Studio
In the recent project I was using few nuget packages. And I was using TFS. Committing these packages into TFS was increasing the size of the repository. Later I found a solution using Enable NuGet Package Restore option. You can enable this option by right clicking on the solution file or from Project > Enable NuGet Package Restore option.
Posted by Anuraj on Saturday, September 28, 2013 Reading time :1 minute
.Net .Net 4.0 Web API
WebAPI will return JSON or XML based on the request accept header. But some times you may need to return JSON only, without considering the accept header.
Posted by Anuraj on Wednesday, September 25, 2013 Reading time :1 minute
.Net .Net 3.0 / 3.5 .Net 4.0 Web API
Sometimes you may required to return anonymous types from your WebAPI functions; I found a situation like this today, where I need to return list of values with a count, which was using to plot some graphs. Initially I thought of creating an class for this purpose with a count property, but later I found a simple solution using anonymous types.
Posted by Anuraj on Tuesday, September 24, 2013 Reading time :1 minute
.Net ASP.Net MVC Entity Framework
Yesterday while working on an ASP.Net MVC application, I got an error like this from Entity Framework Data Context. The problem started when I deployed the application in IIS server, while in the development server (IIS Express) it was working fine. In the connection string, I was using Windows Authentication.