Blog
Blog posts on .NET, Azure, and more.
Creating a Web API Controller with dynamic type
November 05, 2013 by Anuraj
.Net .Net 4.0 ASP.Net MVC Web API
Most of the time while working with Web API; we were dealing with particular model from our domain and creating GET/POST/PUT/DELETE methods that map to CRUD operations. But today I faced an issue, where I need to store some data, and I don’t have a mapping class for the same. As WebAPI doesn’t support two classes in Post action using FromBody attribute, I did it by combining FromBody and FromUri attributes, like this.
Basic HTTP authentication in ASP.Net Web API
November 03, 2013 by Anuraj
.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.
How to do CSS and JavaScript Bundling and Minification in ASP.NET
October 31, 2013 by Anuraj
.Net .Net 4.0 ASP.Net Javascript
ASP.NET 4.5 includes a new feature to minify and bundle CSS and JavaScript within your web application. Static content like javascript and css files contains lot of white spaces and comments. Bundling and minification improves load time by reducing the number of requests to the server and reducing the size of requested assets (such as CSS and JavaScript.) In the past, the recommended technique was enabling compression either using programmatically or you can configure it in IIS. But it was difficult configure and has got some performance issues.
How to broadcast a message from outside SignalR hub
October 08, 2013 by Anuraj
.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.
How to use NuGet without adding packages to TFS
October 02, 2013 by Anuraj
.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.
Copyright © 2024 Anuraj. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Powered by Jekyll. Hosted with ❤ by GitHub