Updated ASP.NET Database Resource Provider



I've updated my database ASP.NET Resource Provider project into a more formal project with a new home page, and official GitHub repository for the source code as well as a getting started video. In this video I talk about what's new and a few examples on how to use the provider.

Read more...



Auto Selecting Cultures for Localization in ASP.NET



When creating multi-language Web sites, one of the key issues you need to deal with is how to assign a culture to display the appropriate resources. Whether you need to auto-switch locales based on browser language, or explicitly assign a locale based on user preferences there is generally some code logic involved in making these decisions. In this post I show what options are available and a small helper that simplifies setting the culture in ASP.NET applications.

Read more...



Using CSS Transitions to SlideUp and SlideDown



CSS Transitions are a nice way to replace jQuery animations with smoother counterparts. Some transitions however, like height and width transitions can be tricky to handle with pure CSS code due to container sizing issues. In this post I show how create create transitions to mimic most of jQuery's slideUp() and slideDown() functions using CSS and small jQuery plug-in.

Read more...



Forms Auth loginUrl not working after Windows Update?



Ran into a problem with Windows Update last week that seems to have broken forms authentication and the loginUrl attribute when set. Looks like new default settings are changing default behavior, and an extra configuration key is required to get the old default behavior back.

Read more...



Using .NET HttpClient to capture partial Responses



Recently I needed to create a high volume monitoring application that retrieves a huge number of HTTP requests, and I need to minimize the amount of data pulled from these requests. In this post I describe some of the limitations in actually pulling an exact amount of data from an HTTP and Tcp/IP connection in .NET.

Read more...



Book Review: Async JavaScript



This is a brief review of the Aysync JavaScript book by Trevor Burnham. It's great, small book that's easy to read and get through, that blazes through various Async concepts in a really easy to understand and practical way. Great read and highly recommended.

Read more...



JavaScript JSON Date Parsing and real Dates



JavaScript doesn't have a date literal, and for this reason JSON serializes dates as strings rather than real JavaScript dates. In this post I show how JSON date serialization works, a few approaches how you can manage dates and how to automate the process of converting JSON dates to 'real' dates more easily.

Read more...



Entity Framework and slow bulk INSERTs



While inserting a large number of records into a SQL database using EF Code First, I ran into some stunningly slow performance. In this article I show the problem and a couple of simple workarounds to this issue.

Read more...



Dell XPS 15 review



I recently picked up new Dell XPS 15 to replace an older XPS machine. Lots of things to like about this machine - here's a quick review of what I liked and didn't.

Read more...



Accepting Raw Request Body Content with ASP.NET Web API



One ASP.NET Web API related question that frequently comes up frequently is how to capture the raw request content to a simple parameter on a controller method. Turns out that's not as easy as it should be. In this post I discuss how to natively capture the raw request content and then create a [NakedBody] attribute that makes it easy capture the raw content in a string or byte[] parameter.

Read more...



Re-examining ASP.NET and Helios Performance Tests



Spend a little time over the weekend re-running some of my ASP.NET raw throughput benchmarks on my new machine and found some interesting results. Much faster, but also some surprises with self-hosting and efficiency surprises with various Web API approaches.

Read more...



Checking out the Helios IIS Owin Web Server Host



During last week's MVP summit Microsoft showed a new light weight, Owin host called Helios, that can run directly on the IIS core without using the ASP.NET Runtime. It's light weight and fast, and offers a glimpse into where Microsoft is heading for building a more nimble and componentized runtime that is bound to be more flexible and agile. In this post I describe how to set up Helios to play around with and some of the implications it brings.

Read more...



Visual Studio 2013 'Could not evaluate Expression' Debugger Abnormality



Ran into an oddball debugger issue last week with an older project in Visual Studio 2013 where all breakpoints show 'Could not evaluate expression' instead of displaying values. This post shows the problem and a couple of ways around it.

Read more...



Routes, Extensionless Paths and UrlEncoding in ASP.NET



When using custom routing in your ASP.NET applications be careful with encoding routes into paths. Specifically make sure that embedded route paths are properly encoded and that you watch out for a few gotchas related to path encoding. This post demonstrates how to set up routes for a WebForms app and demonstrates a couple of potential problems of manual route encodings and the fixes.

Read more...



Dynamically loading Assemblies to reduce Runtime Dependencies



Using a static language like C# tends to work with hard assembly bindings for everything. But what if you want only want to provide an assembly optionally, if the functionality is actually used by the user? In this article I discuss a scenario where dynamic loading and activation made sense for me and show the code required to activate and use components loaded at runtime using Reflection and dynamic in combination.

Read more...



Modern/Metro Internet Explorer: What were they thinking???



The 'Modern' version of Internet Explorer in Windows 8/8.1 is a full screen version Internet Explorer with a custom shell around it. This version of IE has a couple of pretty annoying quirks that affect Web pages significantly.

Read more...



Routing to a Controller with no View in Angular



Angular provides a nice routing, and controller to view model that makes it easy to create sophisticated JavaScript views fairly easily. But Angular's views are destroyed and re-rendered each time they are activated - what if you need to work with a persisted view that's too expensive to re-render? Here's how to build a headless controller that doesn't render a view through Angular, but rather manages the the view or markup manually.

Read more...



Prefilling an SMS on Mobile Devices with the sms: Uri Scheme



Popping up the native SMS app from a mobile HTML Web page is a nice feature that allows you to pre-fill info into a text for sending by a user of your mobile site. The syntax is a bit tricky due to some device inconsistencies, but here's how to do it.

Read more...



Use IIS Application Initialization for keeping ASP.NET Apps alive



Ever want to run a service-like, always-on application inside of ASP.NET instead of creating a Windows Service or running a Console application? Need to make sure that your ASP.NET application is always running and comes up immediately after an Application Pool restart even if nobody hits your site? The IIS Application Initialization Module provides this functionality in IIS 7 and later, making it much easier to create always-on ASP.NET applications that can act like a service.

Read more...



Disable User Account Control On Windows 8



User Account Control can be a real pain and in Windows 8 there's no easy way to turn it off. However, using Group Policy you can still completely disable it if you decide to do so. Here's how.

Read more...



Hosting SignalR under SSL/https



Self-hosting SignalR is easy enough, but using a self hosted server under SSL/HTTPS requires a little extra configuration. This post shows what you need to know.

Read more...



JavaScript Arrays, References and Databinding in Angular



Ran into a snag with Angular Databinding where items added to an array $scope variable were not 'overwriting' other array elements. Turns out this isn't an Angular issue, but a JavaScript referencing issue, that can be easy to miss when using data binging.

Read more...



Self-Hosting SignalR in a Windows Service



Being able to Self-Host SignalR in standalone applications on the server side opens up all sorts of opportunities for dashboard and notification style applications. In this post I show an example of a Windows Service that integrates SignalR to provide real time status updates and describe the required pieces in detail.

Read more...



The Search Engine Developer



Today's Search Engines make developers much more productive thanin the past with untold mountains of developer content at our fingertips. But are we getting lazy because of it, using the search engine as a crutch and losing our edge as developers?

Read more...



IIS Default Documents vs. ASP.NET MVC Routes



ASP.NET MVC's routing takes over extensionless URLs and if you want to serve static default document using IIS's default settings you need to make sure you ignore the default route.

Read more...




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