Monthly Archives: April 2012

ASP.NET Webapi same origin policy workaround using Custom Http Headers

Recently, I’m working on an API that should be accessed by both javascript and desktop clients. During debugging of the javascript client, I ran into the Same Origin Policy problem which prevented my javascript app to make XHR to the

Tagged with:
Posted in .Net Framework

Review of uCertify ASP.NET Web Applications Development Training Kit

I’ve been using the 70-515-CSHARP – MCTS: Web Applications Development Training kit from uCertify for a week. A typical study-learn-practise guide to completing the Microsoft 70-515 exam. The software is installed and used as a desktop application.  I’ll express my subjective views

Tagged with: ,
Posted in .Net Framework, Uncategorized

SimpleCrypto.Net a PBKDF2 Hashing wrapper for .Net Framework

Recently, Jeff Atwood blogged about a hashing speed problem, so I decided to rewrite my library since many people will be searching for easier ways of implementing PBKDF2 hashing. So I moved and re-factored my PBKDF2 algorithm stated in this post into this

Tagged with: , , ,
Posted in .Net Framework

Force download of file from ASP.NET WebAPI

How to generate and download content as files from an ASP.NET WebApi action. This example is focused on text content. When returning a file, we actually utilize `HttpResponseMessage` for low level modification of http headers. First we return HttpStatusCode.OK, then set

Tagged with:
Posted in .Net Framework

Create/Generate an absolute url in asp.net webapi

To get the absolute Url to an action or route in your WebAPI controller that points to another action, play around with the following code: If the route is set to null, the first mapped route in the global.asax file

Tagged with:
Posted in .Net Framework