Recent Weblog Posts
Dynamic Types and DynamicObject References in C#
Wednesday @ 2:47 am

This post explains the difference between dynamic reference and explicit references of an IDynamicObject implementation and how they behave differently.

Unable to cast transparent proxy to type <type>
January 13, 2012 @ 1:25 pm

If you've ever run into the Unable to cast Transparent Proxy to error, you know how frustrating it can be. Usually this is caused by multiple assemblies causing unexpected load behaviors. Here's what the problem is and how you can check for problems.

IE9 not rendering box-shadow Elements inside of Table Cells
January 03, 2012 @ 6:44 pm

Looks like IE9 has a bug that won't render box-shadow CSS when the box-shadow is contained within a table that has border-collapse set. Here's what the problem is and how to work around it.

XmlWriter and lower ASCII characters
January 02, 2012 @ 2:36 am

If you've ever tried to generate an XML document from content that contains lower ASCII characters you might have found out that this will throw exceptions. Here's why this happens and how you can work around the issue in a pinch.

Changing the default HTML Templates to HTML5 in Visual Studio
December 23, 2011 @ 4:19 am

The default WebForms templates in Visual Studio still use the XHTML doctype headers by default. HTML5 doctype headers are easier to use and read and with HTML5 support now becoming mainstream and backward compatible with older browsers its time to switch those doctype headers. This post demonstrates how to change the default VS templates or create new templates altogether. With HTML becoming more prominent and the new headers being easier to read and smaller in size, it's

Debugging Application_Start and Module Initialization with IIS and Visual Studio
December 15, 2011 @ 2:19 am

If you're running the full version of IIS and you try to debug your Web application's startup code in Application_Start you might have found that you can't debug this code as the debugger doesn't break there. Here's why and some easy ways you can work around this limitation.

HTML 5 Input Types - How useful is this really going to be?
December 10, 2011 @ 9:13 pm

The HTML 5 input controls enhancements seem like a nice feature - until you look a little closer and realize that that validation and styling these control enhancement use are likely going to interfere with your existing application logic and styling. Here are are some thoughts on the subject.

HTML 5 Input Types on WebForms Controls
December 10, 2011 @ 8:24 pm

HTML5 input types are new, and as it turns out ASP.NET Webforms input controls can easily create HTML5 input elements.

A Key Code Checker for DOM Keyboard Events
December 08, 2011 @ 3:47 am

Handling keyboard input events in JavaScript can be tricky when you need to deal with key codes. There are browser difference and different behaviors for various key events. Here's a refresher on how keyboard events work and a utility that lets you test key strokes and their resulting key codes in the various events available.

Creating a Dynamic DataReader for easier Property Access
December 06, 2011 @ 5:04 am

Custom dynamic types in .NET are great to wrap other data structures into easier to use and cleaner object.property interfaces. In this post I demonstrate how you can create a dynamic DataReader that allows access to a DataReader's fields using plain object.property syntax.

jQuery Time Entry with Time Navigation Keys
November 30, 2011 @ 2:23 am

How do you display editable time values in Web applications? While date display has a pretty clear UI choice with date pickers, visual time picking isn't very efficient. In this post I show a keyboard based alternative to navigating and entering time (and date values) values using hotkeys hooked up through a jQuery plugin.

Creating a Dynamic DataRow for easier DataRow Syntax
November 24, 2011 @ 3:13 am

The Dynamic Language Runtime features in .NET 4.0 make it very easy to create custom dynamic types that use alternate 'data sources' to expose a new member interface. In this post I describe a simple example that exposes a classic DataRow as a dynamic type to allow cleaner syntax and no need for type casting when accessing DataRow objects.

Dynamically creating a Generic Type at Runtime
November 11, 2011 @ 4:39 am

How do you get a type reference to a generic type instance for a specific set of generic type parameters at runtime? Generics is primarily a coding time tool that creates code at compile time. It's not real easy to create generic types at runtime using dynamic type information. In this post I talk about an issue I ran into while trying to create dictionary types on the fly.

Using the West Wind Web Toolkit to set up AJAX and REST Services
November 03, 2011 @ 4:55 am

In this post I describe how to use the West Wind Web Toolkit to create an AJAX/REST service that can serve data to a JavaScript applications with a few short steps. Then we'll look at ways to access the server side code with simple jQuery/JavaScript code and the ajaxCallMethod() helper.

SnagIt Live Writer Plug-in Updated
October 13, 2011 @ 2:57 pm

I've updated my Live Writer SnagIt plugIn that provides screen captures to LiveWriter if you have TechSmith's SnagIt installed for professional looking screenshots directly from SnagIt into your Live Writer posts.

Loading jQuery Consistently in a .NET Web App
October 10, 2011 @ 12:56 pm

Loading jQuery into a page consistently across the lifetime of an application involves, managing versions and updating urls frequently. In this post I look at my preferred way to load jQuery and how to manage the script reference that gets embedded into the page with a single update location.

An easy way to create Side by Side registrationless COM Manifests with Visual Studio
October 09, 2011 @ 3:58 am

Registrationless COM makes it possible to run COM components without registry configuration making for an xCopy deployable solution. The process is not terribly difficult but not easy to debug if something goes wrong. Here's how you can use registrationless COM in your apps.

Getting a Web Resource Url in non WebForms Applications
October 05, 2011 @ 3:29 am

Need to retrieve Web Resource Urls from a .NET assembly, but not running in WebForms? Here's how you can create a small helper function that lets you retrieve WebResourceUrls from Razor or MVC applications.

An Xml Serializable PropertyBag Dictionary Class for .NET
September 27, 2011 @ 4:50 am

.NET includes many Dictionary related types but serialization of Dictionaries leaves a lot to be desired. In this post I show how to create a serializable PropertyBag class that makes it easy to XmlSerialize arbitrary key/value pairs into XML and back.

Show raw Text Code from a URL with CodePaste.NET
September 23, 2011 @ 6:44 pm

CodePaste.NET has been around for a while now. But did you know that you can also use it to syntax color code from the Web simply by providing a URL and language? Here's how.

Figuring out the IIS Version for a given OS in .NET Code
September 18, 2011 @ 7:50 pm

Need to find the IIS version available for a given OS via code? Here's a small routine that handles this.

FireFox 6 Super Slow? Cache Settings Corruption
August 24, 2011 @ 11:16 pm

Ran into an upgrade problem with FireFox 6 which resulted in very bad performance for Web page loads. Turns out some configuration settings got mangled somewhere along the upgrade process. Here's what the problem was and how to fix it.

Translating with Google Translate without API and C# Code
August 06, 2011 @ 3:44 pm

Google Translate recently changed over to an AJAX UI that broke some of my old screen scraping code I used to do translations in my ASP.NET Resource Provider resource administration app. After a bit of spelunking I found an alternative using the REST calls directly to get back the functionality I lost.

Opening the Internet Settings Dialog and using Windows Default Network Settings via Code
July 20, 2011 @ 12:02 am

Most applications that need to use HTTP to go online require some sort of HTTP configuration options to allow for custom network configurations. An easy way to do this is to rely on the default connection settings that Windows provides. Here's how to use the Windows network settings and how to bring them up visually for editing programmatically.

COM ByteArray and Dynamic type issues in .NET
July 18, 2011 @ 1:36 am

Ran into an interesting issue today with binary data passed from COM to .NET via a dynamic instance. The result was rather unexpected with dynamic failing to properly cast the binary to byte[] or even a basic object instance.

Getting the innermost .NET Exception
July 01, 2011 @ 12:32 am

In some cases when exceptions are thrown, the innermost exception is what holds the most important information. For example, dynamic method calls via Reflection or dynamic invocation. Here's a simple funciont that is useful for easily retrieving the innermost exception.

ActiveX component can't create Object Error? Check 64 bit Status
June 19, 2011 @ 11:55 pm

When moving applications to 64 bit servers be sure to check that you don't call old school, 32 bit COM objects. If you do these COM object calls fail. Thankfully IIS 7 and later allows Application Pool configuration to enable 32 bit operation to work around this issue. Here's how.

Building a jQuery Plug-in to make an HTML Table scrollable
May 28, 2011 @ 1:21 pm

Table displays in limited space require some rendering alternatives. While paging is a common way to address fixed size displays, it's not an end-all solution. Sometimes it's necessary to display larger amounts of data in a small fixed space on an HTML page. Scrollable list are fairly easy to do with most HTML structures, but HTML tables are notoriously difficult to manage when it comes to scrolling. In this post I describe a jQuery plug-in that attempts to make any table scrollable by decomposing and reassembling the table into two distinct areas.

Web Browser Control – Specifying the IE Version
May 21, 2011 @ 12:06 am

The Web Browser control's default rendering mode is not very standards compliant - it's stuck in IE 7 quirks mode which is less than ideal for any HTML preview operations. It also fails to display the latest CSS and HTML 5 enhancements of IE 9. Luckily there's a workaround via some registry hacks that you can add to make your application render the Web Browser control using a specific version of IE.

Built-in GZip/Deflate Compression on IIS 7.x
May 05, 2011 @ 1:42 am

IIS 7.x makes content compression via GZip very easy. Here's how compression on IIS works and how you can set it up on your server in a few simple steps.

ASP.NET GZip Encoding Caveats
May 02, 2011 @ 3:17 am

GZip and Deflate compression is easy to use in ASP.NET applications, but there are a few caveats that you need to watch out for. This post reviews the basics of implementing compression in ASP.NET code and describes a couple of scenarios that can cause problems when using programmatic compression via Response.Filter.

Restricting Input in HTML Textboxes to Numeric Values
April 22, 2011 @ 4:25 am

There are lots of examples limiting HTML textbox input to numeric values only but most examples fail to capture valid keys like navigation and edit keys properly so as to not interfere with normal textbox behaviors. Here's a simple plug-in that takes special keys into account.

WinInet Apps failing when Internet Explorer is set to Offline Mode
April 20, 2011 @ 10:15 pm

Ran into a problem with applications using WinInet not being able to connect to the Internet when IE is stuck in Offline Mode. Here's the problem and a code workaround that works at least with the latest version of IE.

Rounded Corners and Shadows – Dialogs with CSS
April 11, 2011 @ 2:16 am

CSS 3 provides for box-radius and box-shadow, two features that make it really easy to create attractive floating windows easily with native CSS. Here's what you need to know to create rounded corners and box shadows effectively.

Error on 64 Bit Install of IIS – LoadLibraryEx failed on aspnet_filter.dll
April 04, 2011 @ 1:07 pm

Ran into a problem on my 64 bit machine with IIS trying to load 32 bit dlls. Turns out this is a misconfiguration that occurred from some additional installation that failed to set a specific bitness valuie and pointed to 32 bit install. Here's what happened and how it got fixed.

Displaying JSON in your Browser
April 01, 2011 @ 1:50 am

Ever need to display JSON in your browser and finding out that it's a pain? Here are some tips on how to display JSON data without pesky download dialogs or display errors in your favorite browser.

Archives
Categories
ASP.NET (216) .NET (81) Personal (68) jQuery (55) JavaScript (54) AJAX (50) Visual Studio (49) CSharp (38) HTML (34) LINQ (32) IIS (30) Vista (28) WCF (27) ASP.NET (24) FoxPro (21) Windows (21) Localization (21) Web Services (15) COM (14) Microsoft AJAX (13) WPF (12) ADO.NET (12) XML (10) CSS (9) Web Connection (8) Silverlight (8) Security (7) Sql Server (7) HTTP (7) West Wind Ajax Toolkit (7) C++ (6) IIS7 (6) MVC (6) Hardware (5) Html Help Builder (4) ISV (4) Bugs (4) Office (4) Software Development (4) Live Writer (4) WebLog (4) Windsurfing (3) Source Control (3) DataBinding (3) Help Builder (3) IIS7 (3) Installation (2) HTML5 (2) Help (2) Conferences (2) ADO.NET (2) Visual Studio (2) Speaking (2) Maui (2) Razor (2) RegEx (2) RSS (2) WinForms (2) Web Design (2) Tools (2) Travel (1) Utilities (1) Threading (1) Web Deployment Projects (1) wwHoverPanel (1) SmartPhone (1) Networking (1) Addins (1) Control Development (1) FireFox (1) Graphics (1) Html Help (1) Internet Explorer (1) iPhone (1)


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