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.
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.
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.
HTML5 comes with lot of new APIs, one of the my favorite is File Reader. The File Reader API helps to read and manipulate contents of the files. Here is the code snippet, which helps to select multiple image files using file browser control and upload to server using JQuery.