Contact   •   Articles   •   Products   •   Search

Rick Strahl's Web Log

Wind, waves, code and everything in between...
ASP.NET • C# • HTML5 • JavaScript • AngularJs

Weblog Posts in April 2012

GZip/Deflate Compression in ASP.NET MVC

If you want to create ASP.NET MVC content that uses gzip or deflate compression you need to use some custom code. Here's an action filter that compresses content in your ASP.NET MVC applications.

Internet Explorer and Cookie Domains

Got tripped up today by another IE issue: Internet Explorer will not accept Cookies with local domains set for the Cookie Domain and fail silently.

Getting a 'base' Domain from a Domain

I was surprised to see that there wasn't some way in .Net to retrieve the base domain name from a sub-domain. For example, I want, and to return me just the base url. Easy enough but there are a couple small issues to check for especially when dealing with string based domain names.

ASP.NET MVC Postbacks and HtmlHelper Controls ignoring Model Changes

Today I discovered an MVC behavior I hadn't noticed: For HTML helper controls MVC always uses POSTBACK values to display the control value rather than model values when the View is rendering in a POST back. In effect this means that MVC Views can't update the value of controls during a POST back using the standard HTML Helper Controls.

Wishful Thinking: Why can't HTML fix Script Attacks at the Source?

I'm dealing with user HTML input in a Web application today and again I curse over the complexities involved in sanitizing this html. So today I started dreaming about a possible alternative...

Odd MVC 4 Beta Razor Designer Issue

I have an odd designer issue with MVC 4 Razor pages which are causing errors in the environment.

Physical Directories vs. MVC View Paths

Physical directories that map paths that are also mapped by ASP.NET MVC routes can cause some consternation, especially if you're not aware that there's pathing overlap between the two. This post is a story about an operator error episode of an accidental file move that took a while to trace down due physical path interference.

Creating a JSONP Formatter for ASP.NET Web API

Web API doesn't include native JSONP support, but it's pretty easy to create a custom formatter that handles this task. Here's how to create a JsonpFormatter and hook it up as well as a short review of how JSONP works.

West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2015