How to do CSS and JavaScript Bundling and Minification in ASP.NET

Posted by Anuraj on Thursday, October 31, 2013

.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 (I have a post on enabling compression in asp.net using Http Module.), 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

Posted by Anuraj on Tuesday, October 8, 2013

.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

Posted by Anuraj on Wednesday, October 2, 2013

.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.

How to configure WebAPI always return JSON

Posted by Anuraj on Saturday, September 28, 2013

.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.

How to return anonymous types from WebAPI

Posted by Anuraj on Wednesday, September 25, 2013

.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.

Entity Framework Error - The underlying provider failed on Open

Posted by Anuraj on Tuesday, September 24, 2013

.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.

How to enable Windows Authentication in IIS Express

Posted by Anuraj on Thursday, September 12, 2013

.Net ASP.Net ASP.Net MVC Visual Studio

Unlike IIS Server, IIS Express doesn’t support Windows Authentication by default. You can enable the Windows Authentication in IIS Express by modifying the applicationhost.config under the “C:\Users[username]\Documents\IISExpress\config” directory. You need to find the windowsAuthentication element under authentication, and change the value of attribute enabled to true.
Subscribe


Copyright © 2017 - Anuraj P. 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. Hosted with ❤ by GitHub