Custom ASP.NET MVC Authorization Attribute For Ajax Requests

by Bill Beckelman 1. April 2010 14:34
One issue that I have had for a while that I think I finally solved was what to do with unauthorized jQuery Ajax requests in my ASP.NET MVC application. I finally wrote a custom authorization attribute to take care of the situation. I ran into two issues while constructing the attribute; the first ... [More]

Send Email To a Drop Folder in ASP.NET or ASP.NET MVC

by Bill Beckelman 31. March 2010 13:10
Just a quick tip that I picked up somewhere a while back. Just add the code below to your web config and you don’t have to worry about sending out test emails. It will just drop a .eml file to the folder you designate. You can then open the file and inspect the email with just about any email client... [More]

Policy Signing in C# for Streaming Private Content From Amazon CloudFront

by Bill Beckelman 30. March 2010 12:29
On March 29, 2010 Amazon announced public availability of CloudFront’s private content streaming feature. When I first looked at Amazon’s CloudFront offering a few weeks ago, this feature was one I knew I needed and it wasn’t available so I didn’t look much further. With this announcement, I decided... [More]

Tags:

ASP.NET MVC | ASP.NET | AWS

Log Parser 2.2 From Microsoft

by Bill Beckelman 24. March 2010 08:01
I really like ELMAH for logging unhandled exceptions on my websites. Some of the things that it logs are the user’s IP address as well as the page they were attempting to reach and the referring page that they came from. Sometimes though, this isn’t quite enough and I like to look at the IIS log fil... [More]

Tags:

IIS | ASP.NET MVC | ASP.NET

JetBrains WebStorm IDE

by Bill Beckelman 19. March 2010 09:44
I have been using the new web IDE from JetBrains (the makers of Resharper) called WebStorm through several of their preview releases now. I have to say I am really impressed. The Javascript and CSS editors seem to be miles ahead of Visual Studio (2008 at least).  They are projecting a beta rele... [More]

Handling Errors During Ajax Calls With ASP.NET MVC

by Bill Beckelman 18. March 2010 12:54
Gracefully handling errors that occur during Ajax calls in a simple yet standard way that didn’t clutter up my methods with a lot of extra code took a while to figure out. I ended up creating an OnException action filter that I place on my controller or methods as appropriate. When an error is thro... [More]

Tags:

ASP.NET MVC

Removing the X-AspNetMvc-Version Response Header

by Bill Beckelman 15. March 2010 10:53
I was interested in removing the X-AspNetMvc-Version response header this morning. It turned out to be easy enough in code. Just add MvcHandler.DisableMvcResponseHeader = true to the Application Start event in your Global.asax.cs file. Here is a really good write up on Howard van Rooijen’s blog on t... [More]

Tags:

ASP.NET MVC

Zen Coding – VS Studio Plugin

by Bill Beckelman 28. November 2009 12:13
Last week I saw an article on Ajaxian about Zen Coding which is a way to generate html markup and css from css selectors. Something like div#Dialog>fieldset>ol>li*3>label + a hotkey will create: Code Snippet <div id="Dialog">     <fieldset> ... [More]

About Me

I live and work in Salt Lake City, Utah. My background is in aviation. I have a degree in Aeronautical Science from Embry-Riddle Aeronautical University in Prescott, AZ. I have worked as a commercial airline pilot and most recently as a technical advisor for a charter airline.