This is an summary archive of links to articles, white papers and in
depth blog posts I've published since the late 90's. This list does not
include everything, but everything is occasionally culled to remove
content that is no longer relevant or obsolete. Enjoy.
Programmatic Html to PDF Generation using the WebView2 Control with .NET
March 26th, 2024
This article describes how to use the Microsoft WebView2 control to automate HTML to PDF generation generically for any kind of Windows application, including services. We'll look at the WebView and it's printing functionality and some of the intricacies that are involved in hosting the WebView control outside of a desktop application context to provide unattended mode even in service context.
Integrating OpenAI Image Generation into a .NET Application
December 21, 2023
Image Generation AIs are proving to be very good at creating images that can be used for all sorts of purposes. In this article I discuss how you can integrate image generation right into your own .NET applications using the OpenAI REST API. In addition I'll show how you can integrated this functionality into a larger application and discuss some general thoughts on image AI usage based on some of the experiences from a developer/non-designer user perspective.
Embedding a minimal ASP.NET Web Server into a Desktop Application
November 27th, 2023
Did you ever need to embed a Web Server into a non-Web application? In this post I describe how you can use host ASP.NET in a non-Web application and specifically in a WPF desktop app. What do you need, how is it different and some of the issues that you need to consider if you want to use ASP.NET in your non-Web applications.
A WPF Statusbar Control
Auguest 8th, 2023
Statusbar controls are boring, but because of the way that they are used there are a number of caveats like ensuring the UI updates even in linear code, allowing for timeouts of status messages and resetting to default, and to provide some visual clues to draw attention to the status messages displayed. In this post I talk about a custom status bar control and helper that make it super easy to use a new status bar control or attach additional functionality to an existing status bar.
Getting the .NET Desktop Runtime Installed with a Custom Runtime Checker and Installer
June 21st, 2023
I've recently moved my Markdown Monster Desktop Application to .NET 7.0 and I had to make a decision on how to get the Runtime installed or packaged with my application. In this post I review the different deployment modes, the plus's and cons and the solution I ended up with which was to build a custom install wrapper that can check and install the runtime if not already present from an Installer or interactively.
Using Application Insights in .NET Desktop Applications
June 21st, 2023
Using Application Insights with desktop applications isn't the most obvious operation, as App Insights has been primarily designed as a tool for providing logging, statitics and exception report for Web based applications. However, with a little bit of reworking it's actually quite straight forward to use Application Insights with Desktop applications and in this post I show you how I integrate App Insights in my WPF applications.
Implementing Two-Factor Auth using an Authenticator App in ASP.NET
May 17th, 2023
Two factor authentication using Authenticator apps is getting more popular. One advantage of Authenticator 2FA is that you don't need to use a service nor do users have to provide additional bits of personal information. It's easy to implement, doesn't cost anything and also very secure as it uses one-time codes that can't easily be corrupted short of physical take over of a device. In this article I describe how Authenticator based 2FA works in the context of an application without using ASP.NET Identity.
Basic Windows Machine Hardware information from WMI for Exception Logging from .NET
February 2nd, 2023
When writing out error information for a desktop application to a log whether local or to a telmetry engine, it's useful to get some idea of what hardware the app is running on. WPF applications in particular can have odd behaviors that are related to hardware acceleration, running inside of a VM or particular video drivers. In this short post I show how you can get very basic machine and GPU information that provides information on these basic system stats that can prove useful to trackdown rare hardware related issues.
Creating a .NET Tool to Set Windows Display Resolution from the Terminal
December 6th, 2022
I recently switched to a single 4k monitor and had a need to quickly switch resolutions to avoid the UI hostile Windows Display Resolution widget in Settings. I ended up creating a small command line utility called SetResolution that lets you quickly and easily set a new Resolution, create profiles of resolutions to switch to.
Custom HTTP Response Header Manipulation in ASP.NET Core
July 7th, 2022
HTTP Headers are a core part of the HTTP protocol and while applications rarely need to deal with them, when you need to set them - especially globally - ASP.NET Core doesn't have an obvious, built-in way to add headers to every request. In this back to basics post I describe what HTTP header, why you might set them and show how to set them as part of individual requests as well as globally for every request in your site.
Runtime C# Code Compilation Revisited for Roslyn
June 7th, 2022
Recently I needed to update my scripting tools that are integrated into Markdown Monster, in order to support .NET Core. The old CodeDom compiler APIs I'd been using as part of my `Westwind.Scripting` library aren't supported in Core and so I ended up updating to the newer Roslyn CodeAnalysis APIs. In this post I discuss how the Roslyn compilation APIs work, and how I built and updated the Westwind.Scripting library to provide an easy to use wrapper around these tools.
Combining Bearer Token and Cookie Authentication in ASP.NET
March 29th, 2022
In some situations you might need to use both Bearer Token and Cookie Authentication in a single application. In this post I look at a few scenarios where this is required and show how to configure your Authentication to let you access your site with either authentication scheme.
Creating a Static Web Content Project for Publishing with WebDeploy
March 3rd, 2022
Static content projects are more and more common and if you need to publish directly to an IIS Web Server using WebDeploy is one of the options you have. If you're building .NET projects there are many ways to publish projects from Visual Studio and the `dotnet` CLI. Unfortunately there currently is no .NET/Visual Studio project type that works out of the box for Static Site content - if you need to use WebDeploy. In this post I discuss how to hack a .NET Web project to work with static content only.
Integrating Long Path Names in Windows Applications
January 3rd, 2022
Long Path Names in Windows are a pain in the butt, but Windows 10 recently starting adding better support for Long Paths in Version 1607+ which for now has to be enabled explicitly. It also requires an application configuration switch in the manifest file. As nice as that support is, it doesn't solve all problems especially when integrating with other components or external applications that don't support long paths. In this post I describe what works, what doesn't and a few hacks to make most things work.
Discovering new C# String Pattern Matching Features
November 1st, 2021
s
I admit it: I haven't been using the new C# pattern matching features a lot, but every once in a while ReSharper smacks me in the head and points out a good pattern that not only makes the code more compact, but also makes it more readable. In this post I talk about a few patterns that help with null and string casting and with comparing values in a more natural way.
Building and Consuming REST API Services with FoxPro
October 20th, 2021
REST API Services are no longer a novelty, but have become the standard way for organizations to publishing services for remote access. Whether it's public APIs both free and commercial, as well as SPA apps that use internal APIs for a backend, REST's simplicity and loose suggestions has won out of more complex service architectures of the past. In this article from Virtual FoxFest 2021 I talk about how you can access REST services from FoxPro and how to create REST services using FoxPro and Web Connection.
LiveReloadServer - A Generic Local Static Web Server with Live Reload based on .NET
March 23rd, 2021
This article describes using and building of LiveReload Web Server which is a local static file Web server that includes support for Live Reloading, plus some optional dynamic features for rendering self-contained RazorPages and Markdown content. This Dotnet Tool is fast, easy to use and includes a host of convenience features that try to make the process of working with local Web content quicker and easier.
Using the WebView control to capture HTTP Request Content
August 21st, 2021
Need to capture requests when navigating the new Edge WebView2 control? The control supports this but the way that you do this is a little less obvious than you might be used to from other browser controls. Here's how to do it.
Role based JWT Tokens in ASP.NET Core APIs
March 09, 2021
ASP.NET Core Authentication and Authorization continues to be the most filddly part of the ASP.NET Core eco system and today I ran into a problem to properly configure JWT Tokens with Roles. As I had a hard time finding the information I needed in one place and instead ended up with some outdated information, I'm writing up a post to hopefully put all the basic bits into this single post.
Creating Custom .NET Project Types with .NET CLI Project Templates
October 5th, 2020
Custom project templates can be extremely useful in quickly creating new projects especially for extensible applications. They're also great for creating specialized setups to make it quicker to hit the ground running. With the .NET SDK tooling new project templates are now easy to create and this post takes you through the process.
Wrestling with Clipboard Image Formats in WPF
September 16th, 2020
Retrieving images from the clipboard with WPF seems so simple, but once you get into it you'll find that there are lots of problems with reliable image retrieval that works for all images. In this post I talk about the different issues you're likely to run into and one hacky but flexible solution to better image support by selectively sniffing image formats and using different clipboard retrievals based on the image format.
Using .NET Core Tools to Create Reusable and Shareable Tools & Apps
August 5th, 2020
Dotnet Tools offer a simple way to create, publish and consume what are essentially .NET Core applications that can be published and shared using the existing NuGet infrastructure for packaging and distribution. It's y quick and easy to build tools that you can share either publicly or privately. In this article I make a case for why you might use or build a Dotnet Tool and show how create, build, publish and consume Dotnet tools as well as showing some examples of useful tools I've build and published.
Content Injection with Response Rewriting in ASP.NET Core
March 29th, 2020
If you're creating middleware components you might need at some point to inject content in the existing HTTP output stream in ASP.NET Core. In this post I discuss how to intercept Response output by using a customized stream, modify the data and update the final output generated, effectively providing response filtering.
Back to Basics: Rewriting a URL in ASP.NET Core
March 13th, 2020
Sometimes in an application you need to take over the routing process with some custom processing that acts on an incoming URL and actually has to go to another URL. This can be a simple relinking task from old content to new, or it can be more complex where you access a specific URL on the public site that actually needs to be processed by another URL altogether.
Enhancing Web Applications with VueJs
February 7th, 2020
This very detailed article talks about the benefits of using VueJs
and how to use it not as a SPA framework, but as drop in framework
for existing Web applications. This article covers the concepts of Vue
as well as the basics and walks through a couple of example applets
also demonstrating using a Visual FoxPro Web Connection API backend.
Deploying and Configuring West Wind Web Connection Applications
December 3rd, 2019
This very detailed article describes the end to end process of taking a West Wind Web Application and deploying it to freshly installed a Cloud hosted Virtual Machine Windows Server.
It covers Windows and IIS configuration, packaging, uploading and configuring your Web Connection application on the server using the provided scripts and tools in Web Connection.
Finally the updating both Web files and binaries on the server.
Building a Live Reload Middleware Component for ASP.NET Core
June 10th, 2019
Want to Hot Reload client side *and* server side content when you make changes in your code or markup? In this article I describe how to create a Live Reload Middleware Component that can be enabled during development to provide live reloading on any changes you make. This article covers.
ASP.NET Core In Process Hosting on IIS with ASP.NET Core 2.2
June 3rd, 2019
ASP.NET Core 2.2 adds support for direct in-process hosting which improves throughput considerably using an easy mechanism that allows switching between in-process and out-of-process hosting. In this article Rick describes in detail how the in-process and out of process models work and why you should in most cases use the in-process model for its better performance and resource usage.
Using .NET Standard with Full Framework .NET
February 19th, 2019
Using .NET Standard on full .NET Framework is a mixed bag because the behavior of .NET Standard differs depending on which version of the Runtime you are integrating with. In this article Rick reviews what .NET Standard is and how it fits in with the full .NET Framework and how you can use .NET Standard packages/assemblies in full framework along with some of the problems you have to watch out for.
COM Object Access and dynamic in .NET Core 2.x
January 22nd, 2019
I was surprised to find out that COM Interop works in .NET Core when running on Windows. It's possible to access COM components via Reflection easily enough in .NET Core 2.x. Unfortunately use of the `dynamic` keyword does not work in .NET Core 2.x so for the moment COM interop is limited to using Reflection.
A Visual Studio to Visual Studio Code Snippet Converter
January 14th, 2019
Visual Studio Code Snippets are very useful and a great productivity enhancing tool for templating reusable code blocks into the editor. I have tons of snippets I use all the time for great productivity savings, so I created a small hacky utility to move code snippets from Visual Studio to VS Code and with more limited features to Rider.
Creating a .NET Global Tool from an existing Console Application
November 5th, 2018
.NET Core doesn't support creating executables directly, but it does have support for **Global Tools** which provide a mechanism to register a console application and make it easily accessible using a simple command line command rather than a complex `dotnet.exe` command.
Marking up the World with Markdown and FoxPro
October 30th, 2018
This white paper contains my session notes for the Southwest Fox 2018 session Marking up the World with Markdown. This article provides an overview of what Markdown is and why it is useful for generic writing tasks as well as for integration into FoxPro or Web applications. Markdown is immensely popular these days as a text entry format and in this post you learn how you can easily use it from your own FoxPro and more importantly why you might want to use it in the first place
Marking up the Web with ASP.NET Core and Markdown
July 1st, 2018
This article covers a generic Markdown page handler that you can drop into any site to handle semi-static page editing more easily with Markdown from within an ASP.NET Core application. While Markdown is common fare in CMS or blog applications, it's not so apparent how to get similar generic Markdown document rendering within the context of an existing application. The middleware I describe here allows you to simply drop a markdown file into a configured folder and have it rendered into a stock template. Simple but very useful.
Web Assembly and Blazor: Re-assembling the Web
June 31st, 2018
Web Assembly is changing the way we think about Web development with new ideas and approaches that may not involve JavaScript. Microsoft has put its foot forward with a new Web Assembly based framework called Blazor that combines Razor templates with C# code to provide a rich .NET based front end experience. There's much to think about and understand in this still experimental framework, but the concepts it presents provide a welcome change to the JavaScript status quo. In this post I examine how Web Assembly and Blazor interact, how .NET code is used and give some thoughts on how this technology fits into the Web stack.
Securing IIS Web Sites with Let’s Encrypt Certificates
December 26th, 2017
Lets Encrypt makes it very easy to create free TLS certificates for your Web site. In this CODE magazine article Rick reviews some of the history of Lets Encrypt and then shows how you can easily take advantage of it to create free and automatically installed and updated certificates for your Windows based IIS Web servers.
Easy Configuration Binding in ASP.NET Core - revisited
December 12th, 2017
This article takes another look at using strongly typed configuration settings in ASP.NET Core, using a slightly simpler approach that foregoes using IOptions in favor of directly using a configuration object instance. In the process I review the various approaches as a summary for getting configuration settings into .NET types.
Flexing Your HTML Layout Muscles with Flexbox
November 11th, 2017
Flexbox is a relatively new CSS Layout module that can greatly simplify creating complex layouts
with HTML. Even though Flexbox has been around for some time, supported by most browsers and
very close to standards ratification, uptake of this powerful new layout model has been fairly slow.
In this article Rick looks at Flexbox's raison d'etre, how the core concepts work and round it out with
a few useful examples of a couple of common use cases.
.NET Core 2.0 and ASP.NET Core 2.0 are Here
October 22nd, 2017
After a long wait .NET Core and ASP.NET Core 2.0 are finally here. This release is a major update from Version 1.0 that brings back a ton of functionality that was originally missing in .NET Core 1.x. With closer compatibility to full framework .NET it's much easier to port existing code to .NET Core, as having a much larger API surface to use in your applications. There are many usability improvements that make it easier to get started using considerable less fanfare. In this post I describe some of what's new and what's great and also a few things that are not so great.
Advanced Scenarios for using the Web Browser Control in Visual FoxPro
October 20th, 2017
This article discusses how to use the Microsoft Web Browser control to create
rich Web based UI components inside of your FoxPro applications. The article
starts with the basics and then dives deep into integration and interaction
between both the application and the Web Browser and how to use and interact with
JavaScript based UI components from FoxPro. Session notes from Southwest Fox 2017.
Using the Real Time Web with SignalR and Visual FoxPro
October 20th, 2017
This article describes how you can build real time applications
that provide live data updates by using Web Sockets and SignalR
from Visual FoxPro. Session notes from Southwest Fox 2017
Accepting Raw Request Body Content in ASP.NET Core API Controllers
September 13th, 2017
When posting raw body content to ASP.NET Core the process is not very self-explanatory. There's no easy way to simply retrieve raw data to a parameter in an API method, so a few extra steps are provided using either manual handling of the raw request stream, or by creating custom formatter that can handle common 'raw' content types in your APIs via standard Controller method parameters. In this article I look at various permutations and how you can access the raw data in your code.
Building a Literal Markdown Control for ASP.NET WebForms
September 13th, 2017
This article describes a Markdown control for ASP.NET that handles parsing Markdown as
well as providing a content control that allows embedding of literal Markdown Text inside
of an ASP.NET WebForms page. This is quite useful for content heavy pages and allows for
easy creation of content without angle brackets. This article goes into the details of
implementation and usage of this control.
Multi-Targeting and Porting a .NET Library to .NET Core 2.0
June 22nd, 2017
Find out how you can take existing full framework .NET components and port them to
.NET Standard and as a bonus learn how to multi-target both .NET standard and full
framework using the same project with the new .NET SDK project format.
Bypassing IIS Error Messages in ASP.NET
June 1st, 2017
IIS Error handling is the source of lots of confusion. I've been using IIS for nearly 20 years now,
and figuring out the right combination of error configuration settings and code to properly
serve custom error pages or error responses in API still makes fumble a few times before I
get it just right. This article provides an overview of error handling mechanisms available
in IIS and how you control which one actually fires in your application.
IIS and ASP.NET Core Rewrite Rules for Static Files and Html 5 Routing
April 27th, 2017
If you're running ASP.NET Core under Windows with IIS, you'll want to take advantage of letting IIS serve up your static content and handle your HTML 5 Client and home routes. IIS is very efficient at handling static content and content re-routing and in this post I describe how you can properly configure ASP.NET Core applications using the AspNetCoreModule and IIS Rewrite Rules.
Running .NET Core Apps under Windows Subsystem for Linux (Bash for Windows)
April 13th, 2017
The Windows Shell for Linux (WSL or Bash on Ubuntu on Windows) provides a nice way for Windows and Linux to interact without the overhead of dealing with a separate VM. Using the WSL you can now also run your .NET Core applications directly under Linux without requiring a VM or Docker. In this post I demonstrate how the shell works and how you can run your .NET and ASP.NET Core applications to test operation under Linux..
More on Running ASP.NET Core under IIS
March 16th, 2017
This article looks at a few specific scenarios for hosting ASP.NET Core on IIS: Impersonation and how it affects your Kestrel server, Kestrel Performance under IIS and how to let IIS serve static content while Kestrel serves application level code.
Getting down to Business with ASP.NET Core
January 12th, 2017
This CoDe Magazine article focuses on building an ASP.NET Core backend for an Angular 2 front application, covering all aspects of separating business and Web app logic, dealing with EF Core data access in related tables, CORS to be able to run across domains and simple authentication in a client centric REST service application. Check it out.
Creating a portable and embedded Chocolatey Package
January 29th, 2017
This article looks at a few specific scenarios for hosting ASP.NET Core on IIS: Impersonation and how it affects your Kestrel server, Kestrel Performance under IIS and how to let IIS serve static content while Kestrel serves application level code.
.NET Standard 2.0 - Making Sense of .NET Again
November 23rd, 2016
Chocolatey is an awesome tool to install software. As a publisher you have a lot of choices of how to create packages and in this post I describe the two packages that I use with Markdown Monster, which is a full downloaded installer package and a fully self contained embedded portable package. Here I cover the basics of Chocolatey package creation and some of the steps required to create a portable package from a full installation and some of the challenges you might run into along the way.
Getting to the ASP.NET Core
October 20th, 2016
This article in CoDe magazine is a low level introduction to the .NET Core framework and how to build an ASP.NET application
from the ground up, starting with a Console application and adding features up to building a basic Web API and MVC front end.
The article demonstrates the core functionality how to set it up and put it all together, deploy it to both IIS and also
run the very same application on a Mac.
Error Handling and ExceptionFilter Dependency Injection for ASP.NET Core APIs
October 16th, 2016
Exception handling in API applications is important as errors - both handled and unhandled - need to be passed
to clients in some way to let them display error information. ASP.NET's default error handling doesn't provide
for object error results by default, but you can use an ExceptionFilter to intercept exceptions and format them
yourself. In this post I look at how to create an API exception filter to create error object responses, and
hook up custom logging of those errors to disk.
10 Cool Examples of using .NET and wwDotnetBridge with Visual FoxPro
September 24th, 2016
wwDotnetBridge lets you call just about any .NET code directly from FoxPro and helps overcome
most of the limitations of regular .NET COM interop. Using this small library opens up a
number of opportunities to interface with .NET functionality that wouldn't otherwise be
available. In this talk, you'll see 10 (or more, depending on time) small, ready to use
and practical examples that demonstrate how you can integrate with .NET and use many
open source libraries that are available for performing a host of useful everyday
tasks that would be difficult or impossible to achieve natively in FoxPro.
Session Notes from Southwest Fox 2016.
Using Angular 2.0 and Web Connection to create Mobile Web Applications
September 24th, 2016
In this article Rick gives an introduction to building Mobile Web Applications
with Angular 2.0 and Web Connection on the backend. The article starts with an
overview of Mobile Web technology and then dives into explaining how Angular 2.0
works and how to build a front end application that interfaces with Visual FoxPro
via Web Connection. This is a long article that covers many different areas.
Session Notes from Southwest Fox 2016.
First Steps: Exploring .NET Core and ASP.NET Core
June 29th, 2016
Take a low level tour of .NET using the command line tools to understand the
underpinnings of ASP.NET Core. In this article, Rick starts with a very simple
console application, shows how to hook up ASP.NET, runs an API and MVC app and
then runs the app locally on Windows and finally moves it over to run on a Mac.
This article isn't meant to be your typical getting started tutorial that jumps right into
Visual Studio and creates Web project from there. Rather, the purpose of this
article is to demonstrate some of the core underpinnings of how .NET Core and
ASP.NET Core projects are bootstrapped to run to gain a fundamental understanding
of how the framework works.
ASP.NET Core and .NET Core Overview
June 23rd, 2016
ASP.NET Core and .NET Core are here and in this article Rick revisits the high level overview
architecture of .NET Core and ASP.NET Core since so much has changed to help you understand
how the pieces fit together and what it means to develop on the new stack along with some
thoughts on how to approach all of this new tech in his own work.
Publishing and Running ASP.NET Core Applications with IIS
June 6th, 2016
If you plan on hosting ASP.NET Core applications on IIS, you'll find that the process to get your
application to run is quite different than it was with classic ASP.NET. Because ASP.NET Core applications
are essentially standalone Console applications that run outside of IIS, some special tooling and new
publishing tools are required to get your apps up and running on Windows Server. In this article Rick
gives an overview of the architecture and shows you how to deploy your ASP.NET Core applications
using IIS on Windows Server.
Using Let's Encrypt with IIS on Windows
April 3rd, 2016
Let's Encrypt is a new, open source certificate authority for creating free SSL certificates.
In this article Rick shows how you can use some of the API clients on Windows to create Let's Encrypt
certificates for use in IIS.
Using Let's Encrypt with IIS on Windows
February 22nd, 2016
Let's Encrypt is a new, open source certificate authority for creating free SSL certificates.
While the core project doesn't have direct support for Windows, a number of alternative projects
have sprung up to provide integration with Windows and IIS. In this articles Rick shows a number
of tools to create, install and renew SSL certificates using Let's Encrypt.
A small jQuery Resizable Plug-in
December 21st, 2015
Resizing of HTML DOM elements comes up in a number of scenarios in HTML design. If you
need to resize containers, or resize 'windows' or adjust control sizes, simple resizing features
are necessary. Unfortunately, there are not very many light weight libraries available to provide this
functionality. In this article Rick describes a small self-contained jquery-resizable component that
provides basic resizing functionality for common tasks in a small package.
Creating and Consuming FoxPro Web Services using .NET
October 29th, 2015
The tools used to create and consume Web Service in FoxPro have long been deprecated.
Want to know about an up to date and more flexible way to create and consume Web Services using Visual FoxPro?
This article demonstrates how you can use .NET to create .NET based Web Services that use FoxPro COM objects
or the FoxPro OleDb driver to create SOAP Web services that use FoxPro data and or code. This article
then also demonstrates how you can reliably call SOAP 1.x Web services using .NET as an intermediary.
Given that the traditional tools like the SOAP Toolkit are long deprecated and that were never really
very flexible in the first place, .NET provides a much more flexible and continually updated platform
for creating and consuming Web services with FoxPro.
Rebooting Database Localization for ASP.NET with West Wind Globalization 2.0
June 23rd, 2015
The West Wind Globalization library provides database resource localization for
ASP.NET Web applications by providing a host of database resource managers and providers
to serve resources from various databases. Database resource management allows for live
and interactive editing of database resources, and the tooling provides a rich Web based
editor that makes it easy to create database resource content and see the results displayed
immediately. The library also provides support for serving server side resources to JavaScript
and the abililty to switch back and forth between Resx and Database resources. In this article
Rick describes features and practical applications of this powerful toolkit.
Strongly typed AppSettings Configuration in ASP.NET 5
June 3rd, 2015
ASP.NET 5 features a new configuration system that includes a number of new configuration
sources as well as an easy way to consume strongly typed resources. In this article Rick
demonstrates how to use the basic features and show how you can use different configuration
stores to hold configuration data.
Adding minimal OWIN Identity Authentication to an Existing ASP.NET MVC Application
April 29th, 2015
ASP.NET 4 provides a new Identity Authentication/Authorization framework that's very
comprehensive and works reasonably well for new applications. However, if you have
existing applications or use custom user management, it's not very clear how to
use just the basic OWIN Authentication/Authorization layer without the full UserManager
and Entity Framework implementation. In this article Rick describes how to use the bare
minimum Identity features to hook up a custom domain model for both local and external
logins in an ASP.NET MVC application.
Creating and Consuming FoxPro Web Services with .NET
October 20th, 2015
Find out how to create and consume SOAP 1.x Web services from Visual FoxPro by using
.NET as the proxy technology to interface with Web services. This article uses ASMX
Web Services to create .NET service interfaces that are loaded from data both using
OleDb direct data access or using COM Interop to access FoxPro business objects to
retrieve data and assign it to the service interface. On the client side this document
describes how to use the .NET Web Service client to create .NET Web Service Proxies
that can then be accessed from FoxPro.
Using FontAwesome Fonts for HTML Radio Buttons and Checkboxes
February 10th, 2015
Spruce up your boring checkboxes and radio buttons with custom FontAwesome symbols using a
little bit of CSS. If you're tired of boring checkboxes and radio buttons, or you simply want
a more consistent look of these controls across browsers and controls check out FontAwesome
to provide you with customizable checks and boxes to use for selection boxes. In this article I'll
show how to use pure CSS to set up FontAwesome checkboxes and radios and talk about a
few gotchas I ran into along the way.
Back to Basics: UTC and TimeZones in .NET Web Apps
February 10th, 2015
Storing dates in persistent storage using UTC dates is a widely accepted best practice.
But it's surprisingly complex using date data effectively if you want to let the user see dates and
query data in their local time zone. Looking around I noticed that there's not a lot of
comprehensive info on this topic, so I decided to take notes and write down some of the approaches
I've used in this post. This article combines and overview and a number of helper routines
specifically geared towards user timezone adjustments in typical ASP.NET Web applications.
Using Cordova and Visual Studio to build iOS Mobile Apps
January 12nd, 2015
Cordova is a hybrid mobile toolset to build Mobile applications using Web
Technologies like HTML5, CSS and JavaScript. Microsoft recently released a
preview of its toolset for building Cordova applications with Visual Studio.
In this article Rick takes a look at the Visual Studio Tools for Apache Cordova
for building, debugging and running iOS mobile applications from Windows.
A First Look at ASP.NET vNext
January 2nd, 2015
In this article Rick takes you on a tour of ASP.NET vNext from the ground up,
starting with some of the low level, command line features up to the high level
frameworks to demonstrate the differences in this new stack, while still staying
true to the concepts and ideology that has made ASP.NET such a popular platform
over the last 15 years. While this release marks breaking changes, the concepts
to build applications should be at once familiar and comfortable to existing
ASP.NET developers.
ASP.NET vNext: The Next Generation
January 2nd, 2015
ASP.NET vNext reimagines the core ASP.NET framework from the ground up with a more modern stack
that provides better performance, lower resource consumption, and an async model for improved
performance, scalability, and economy in cloud-based hosting scenarios. In this article Rick
describes some of the motivations behind this radical change, why it?s needed, and how it's
going to affect planning going forward with ASP.NET.
Creating multi-target NuGet Packages with vNext
December 2nd, 2014
The ASP.NET vNext Platform makes it much easier to create multi-targeted NuGet packages,
through support of multiple build targets from a single project and the ability to compile
project output directly to a NuGet package. This article shows you how you can mix and
match various versions of .NET and the new vNext platform all in a single assembly right
out of Visual Studio 2015.
The broken Promise of the Mobile Web
August 18th, 2014
The Mobile Web has come a long way to provide the abillity to create rich UI and
interactive, immersive and smooth Web based mobile applications. But there are still
big gaps between mobile device features and what's available to Web developers when
interacting with mobile devices. In this post I cover and contrast what's wrong
with mobile Web development today and where I hope we are going, going forward.
Using FiddlerCore to capture HTTP requests with .NET
July 29th, 2014
If you have an application that needs to capture HTTP or monitor HTTP traffic, FiddlerCore
is the tool you can use to do it easily. In this post I demonstrate how easy it
is to integrate FiddlerCore into an application to capture HTTP requests and save
the data, as well as discuss how to deal with configuring FiddlerCore for SSL Certificate
installation for HTTPS captures.
A dynamic RequireSsl Attribute for ASP.NET MVC
June 18th, 2014
In ASP.NET MVC the RequireHttps attribute allows for securing controllers and
controller methods, but it's limited to either on or off statically. In this post
I discuss a
custom attribute that can dynamically set SSL usage based on a configuration setting
or delegate.
Creating ASP.NET MVC Negotiated Content Results
May 20th, 2014
ASP.NET MVC doesn't directly support content negotiation, but with a little bit of
work it's very straight forward to implement a NegotiatedContent ActionResult
that can switch its response type based on the Accept header.
Filtering List Data with a jQuery-searchFilter Plugin
May 10th, 2014
When dealing with HTML based list data, filtering that data based on search text
is a nice UI feature that's very useful for quickly finding what you're looking for.
In this post I show you how to can create this nice UI effect with a few lines of
jQuery code, and then provide a jQuery plug-in that simplifies the process further.
Auto Selecting Cultures for Localization in ASP.NET
March 27th, 2014
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.
Using CSS Transitions to SlideUp and SlideDown
March 27th, 2014
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.
Accepting Raw Request Body Content with ASP.NET Web API
December 13th, 2014
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.
Use IIS Application Initialization for keeping ASP.NET Apps alive
October 2nd, 2013
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 IIS applications.
Self Hosting SignalR in a Windows Service
September 22nd, 2013
Self-hosting of SignalR in a standalone application opens
up all sorts of opportunities for dashboard and notification style Web applications
frontends that weren't easy to create previously. With SignalR's real time communication
directly from a backend application, it's almost too easy to build rich messaging
front ends from server applications. In this article I show an example of a Windows Service
that integrates SignalR to provide real time status updates and describe the required
process of bringing up SignalR from within that service application.
A first look at ASP.NET SignalR
May 22nd, 2013
Last month I finally had a chance to use SignalR in a live project for the first time,
and I've been impressed by what this technology offers to .NET developers. It's easy
to use and provides rich real-time two way messaging between client and server applications,
as well as the ability to broadcast message to all connected clients.
This is technology that offers many opportunities to rethink of what we can build
with Web applications today.
A WebAPI Basic Authentication Authorization Filter
April
20th, 2013
Security is a requirement in most Web applications and ASP.NET WebApi is no exception.
Recently I needed to implement user based security in a WebApi application that's easily
accessible from a variety of clients and the request was specifically for Basic Authentication
support. In this article I describe a simple AuthorizationFilter based implementation of
Basic Authentication for ASP.NET WebApi.
Using plUpload to upload Files with ASP.NET
March
12th, 2013
plUpload is a popular client side multi-file upload component. In this article I describe a
small library that abstracts the server side processing of uploaded files with an ASP.NET HTTP handler
and demonstrate putting it all together with a small Image Upload sample Web page.
Building a better .NET Application Configuration Class
December 28th, 2012
Application configuration is a key feature for application customization and adaptability
and .NET provides some fairly decent built-in support for configuration management. Personally
however I prefer a code-first approach to configuration management and so I've long ago
created a custom component to handle configuration using strongly typed .NET classes that
can read and write configuration data from various data stores. In this article I describe
the built-in features in .NET and then demonstrate the Westwind ApplicationConfiguration component
to show how configuration management in your apps can be even easier.
WCF WS-Security and WSE Nonce Authentication
November 24th, 2012
WS-Security is built into WCF, but it's quite common to have Web Services that require Nonce Authentication
using the WSE protocol that WCF does not natively support. In this article I review how to use
WS-Security with WCF and how you can customize the headers to provide Nonce/WSE support
for your service client.
Using JSON.NET for dynamic JSON parsing
August 30, 2012
Parsing JSON dynamically rather than statically serializing into objects is becoming much more common
with today's applications consuming many services of varying complexity. Sometimes you don't need to map an
entire API, but only need to parse a few items out of a larger JSON response. Using JSON.NET and
JObject,JArray,JValue makes it very easy to dynamically parse and read JSON data at runtime and
manipulate it in a variety of different ways. Here's how.
An Introduction to ASP.NET Web API
August 19, 2012
This article is a practical introduction and hands on overview of ASP.NET Web API. From the basics
of setting up a new API Controller to calling the service via AJAX calls to handling errors, dealing
with model binding this article serves as tour of the core features of Web API by example.
Creating STA COM Components in ASP.NET
August 15, 2012
If you still have to use STA COM components with ASP.NET you'll find that other than
WebForms STA COM support in ASP.NET is non-existant. If you want to use MVC, Web Services
or WCF natively you'll find they all run with MTA and have no easy mechanism to allow STA
components to run reliably. In this article I show how you can create STA compatible handlers
for MVC and ASMX and WCF Web Services.
Calling .NET Components from Visual FoxPro using wwDotnetBridge
October 25, 2012
.NET is here to stay, and you can take advantage of the rich functionality in the .NET framework from Visual FoxPro.
You can access code in the .NET framework as well as Microsoft, third party and your own .NET libraries.
This article expands on my previous COM interop articles and introduces the open source
wwDotnetBridge library
that lets you instantiate and interact with most .NET types directly from Visual FoxPro code. It's a great way
to extend Visual FoxPro's reach as well as allowing FoxPro developers to create their own .NET components that can
be interacted with from FoxPro.
Calling FoxPro COM Components from ASP.NET Revisited
October 25, 2012
If you need to call FoxPro COM components from ASP.NET recent changes in .NET 4.0 have made
this process a bit easier. This article expands on how to create FoxPro COM components in .NET and
ASP.NET in particular by using more modern technologies like ASP.NET MVC and Web Services to call
FoxPro COM Components taking advantage of the Dynamic language improvements in .NET that make it much
easier to consume FoxPro COM components.
.NET HTML Sanitation for rich HTML Input
July 19, 2012
Securing HTML input from users in Web applications is a thorny subject, but there are not many good solutions
out there for .NET. In this article I describe an HTML sanitation scenario and a custom solution I used
to allow posting of relatively rich HTML on a Web site.
Accessing Spatial Data with SQL Server and Entity Framework 5.0
June 20, 2012
Spatial data has been available for a while in SQL Server, but if you wanted to use it with Entiry Framework
you had to jump through some hoops. In this article I show how basic SQL Spatial data works and then how you
can utilize the new features in EF 5.0 and later to directly access spatial data using your CodeFirst models.
Rendering ASP.NET Views to String
May 30th, 2012
Creating templated text output that's not tied to the HTTP output stream is a frequent requirement
in many applications. Rendering confirmation emails, password resets, validations and notifications
all generate text through templates that require string or stream output that doesn't get sent to HTTP.
In this article I show a few helpers that make it easy to create string output from MVC Views.
Creating JSONP Formatter for ASP.NET Web API
April 2nd, 2012
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.
Creating a dynamic, extensible C# Expando Object
May 30th, 2012
Dynamic types in .NET make it very easy to create custom types in .NET. In this article we'll look
at using a custom dynamic type that can extend an existing type at runtime with dynamic properties and methods.
Using the HTML5 <input type="file" multiple="multiple"> Tag in ASP.NET
March 6th, 2012
Upload controls in HTML are a pain, but HTML5 at least allows for multiple files to selected from the file picker to
effectively upload multiple files from a single control. Here's how you use the HTML5 control and how you handle
receiving the files in ASP.NET.
Debugging Application_Start and Module Initialization with IIS and Visual Studio
December 15, 2011
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.
A Key Code Checker for DOM Keyboard Events
December
6th, 2011
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 in JavaScript 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
3rd, 2011
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.
jQuery Time Entry with Time Navigation Keys
November 30th, 2011
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.
Using the West Wind Web Toolkit to set up AJAX and REST Services
November 3rd, 2011
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
Create Side by Side registrationless COM Manifests with Visual Studio
October 9th, 2011
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.
An Xml Serializable PropertyBag Dictionary Class for .NET
October 9th, 2011
.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.
Web Browser Control – Specifying the IE Version
May 21st, 2011
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.
Custom ASP.NET Routing to an HttpHandler
March 28th, 2011
Routing support in ASP.NET 4.0 has been vastly improved, but custom routing still involves a fairly complex process of creating RouteHandlers and mapping requests
properly. In this post I show an example of how to create custom routes automatically via Attribute route mapping
for Http Handler endpoints.
A jQuery Plug-in to monitor Html Element CSS Changes
Feb. 22nd, 2011
I have the need to monitor movement of elements in an HTML document via JavaScript. Unfortunatey
there are no events that fire if HTML elements are moved around the document either via dragging
or by programmatic location changes. As a workaround I created a jQuery CSS monitoring plugin
that fires event when a given CSS property changes.
Hosting the Razor Engine for Templating in Non-Web applications
December 28, 2010
Microsoft's new Razor View Engine is now available with WebMatrix and MVC 3 and the good news is that the engine
can be easily and efficiently hosted in non-Web applications. In this article I'll discuss a library that makes it
easy to embed Razor based templating into your own applications and in the process describe how Razor hosting works.
Making Sense of ASP.NET Paths
January 10, 2010
ASP.NET includes a plethora of functions and utilities to retrieve information about the current requests
and paths in general. So much so that it's often hard to remember exactly which path property or method
you are actually looking for. This article summarizes many of the paths and path related operations that
are available in ASP.NET.
A free standing ASP.NET Pager Web Control
December 18, 2009
ASP.NET includes several controls that support paging but they vary fairly drastically for different
controls and can't be controlled purely by assignment. This article discusses the shortcomings of native
paging in ASP.NET and introduces a free standing pager control that is generic and works without dependencies
on DataSource or other specific ASP.NET controls and provides SEO friendly navigation.
Capturing and Transforming ASP.NET Output with Response.Filter
November 13th, 2009
Capturing ASP.NET response output can be done in a variety of ways. In this
article I discuss how you can use a Response.Filter to capture output and transform it
using a simple class that provides event hooks to make it easy to capture and transform output generically.
Integrating OpenID in an ASP.NET MVC Application using DotNetOpenAuth
September 17th, 2009
OpenId is getting more popular and with it come requests to
integrate it into Web sites as a user authentication mechanism. In
this article I give an overview of what OpenId is, how it works
and demonstrate implementing it in an MVC Web application using the
DotNetOpenAuth toolkit with a detailed walk through of the integration
code.
Making jQuery Calls to WCF/ASMX with a ServiceProxy Client
September 10th, 2009
This article describes a self-contained mechanism for calling
WCF/ASMX services using only the jQuery client library and a bit of
custom code by providing a reusable ServiceProxy class that makes
calling service methods as easy as a single method call.
WPF Localization Guidance
July 1st, 2009
This article introduces the core localization features in the .NET framework relevant for WPF as well
as specific localization approaches supported for WPF. Covered are the static and rigid approach using
LocBaml as well as a couple of approaches using a Resx markup extension or using a more Windows Forms
based approach using attached properties. This article is hosted on the CodePlex site as a downloadable
Microsoft Word document.
Creating Visual Studio Project Templates from your Web Projects
April 27, 2009
Visual Studio provides an easy way to create project
templates from an existing project and this makes it real easy to create
custom project types that are tailored to the way that you work.
A
.closeable Plug-in for jQuery
April 14, 2009
Sometimes you just want to close DOM elements and this little
plug-in provides an easy way to display an icon, handle the closing
of the item and allow for handler to fire in response. Simple
reusable functionality and a small, useful example of jQuery plug-in
development.
Using Enums in ASP.NET List Controls
February 20, 2009
Sometimes it can be handy to display data from Enum values in
lists in the user interface as a quick way to present pick lists,
especially in administration interfaces. Here is how you can load up
enum values in DropDown lists along with some ideas on when this
practice does and does not make sense.
Monitoring HTTP Output with Fiddler in .NET Clients and Proxies
January 14th, 2009
When working with HTTP clients or Web Services being able to capture
HTTP output is crucial. HTTP monitors are invaluable in this process and
using them with .NET clients requires some special care. Here's what you
need to know.
jQuery and ASP.NET (Part 2: Making Ajax Callbacks to ASP.NET)
December 3, 2008
Part 2 of this series introduces focuses on connectivity
between the jQuery client and ASP.NET server. This article discusses the
Ajax functionality available in jQuery and demonstrates a variety of
ways on how to retrieve data from the server and use on the client with
jQuery. Topics covered using .load() with external content, making Page
callbacks with HTML fragments and JSON results and using WCF and ASMX
service to create raw Ajax applications that only consume server data.
An Introduction to jQuery (Part 1: The Client Side)
December 3, 2008
Part 1 of this series introduces the jQuery JavaScript
library and provides an overview of the functionality this powerful
library provides. Article starts with an overview of what jQuery is and
does followed by a walkthrough of some of jQuery's prominent features
starting with Selectors, Wrapped Set functions, event handling all the
way up to simple plug-in creation. Part 1 deals purely with client side
functionality. Part 2 addresses ASP.NET integration and AJAX
functionality.
Digitally signing and validating an XML Document
March 1, 2008
This article describes the complete process of signing an XML
document with a private 7key certificate, and then validating the same
document with the public key. The includes step by step instructions
including creating a test certificate and installing it and how to use
the certificate from your code for signing and validation. It also
covers installation of a full certificate from a qualified CA which is a
slightly different process. A sample class that works with any SOAP
Envelope XML document is provided to demonstrate.
Setting up and running Subversion and Tortoise SVN
August 9, 2007
This article is a quick start step by step guide for setting
up Subversion for Source Control and using Tortoise SVN to set up and
manage your repository and local copies of projects. This article uses a
Visual Studio Solution as an example, but the same concepts can be
applied to any tool or set of files for that matter. The article
discusses installation and setup, creating of a repository, creating
local copies and basic day to day operations.
Creating a data driven ASP.NET Resource Provider & Editor
July 7, 2007
Find out how to build an ASP.NET 2.0 Resource Provider that
uses database data for its localization storage rather than Resx files.
Database resources can be much more flexible and this article
demonstrates how to build a powerful ASP.NET resource editing front end
that allows editing of resource data in a live ASP.NET application in a
context sensitive manner.
Introduction to Localization in ASP.NET 2.0
July 2, 2007
Check out the localization features in ASP.NET 2.0 and
understand how they work under the covers. This introduction focuses on
the ASP.NET 2.0 specific technology for localization and discusses how
Resource Providers are used to provide the various integrated
localization features in ASP.NET 2.0 and Visual Studio .NET. The focus
of this article is on the technology rather on the deep semantics of
localization. Serves as an introduction for the Resource Provider
article.
Create a
Screen Capture Plugin for Windows Live Writer
March 25, 2007
This article demonstrates how to build a Windows Live Writer
plugin that allows for embedding screenshots into the current Blog entry
being edited. The article describes the basics of content plugins for
Live Writer and uses a plugin that uses SnagIt from Techsmith to provide
an easy and flexible way to do screen captures directly into your blog
content using C# code...
Calling and Hosting FoxPro Web Services through .NET
January 9th, 2007
Web Services with Visual FoxPro have always been problematic
with Visual FoxPro especially if dealing with services that publish
complex types. The most common Web Service tool for FoxPro is the SOAP
Toolkit which has been discontinued and has a host of problems dealing
with complex types. In this article I discuss how you can leverage .NET
to make Web Service calls from Visual FoxPro and how to host Visual
FoxPro components in .NET Web Services. The article also demonstrates
how to use Windows Communications Foundation (WCF) for the same tasks.
Creating a
two-way data binding Extender Control for ASP.NET 2.0
November 15, 2006
As much as ASP.NET 2.0 improves data binding, one aspect -
simple control binding for controls like textboxes, checkboxes and
selected values of lists for example - is still tedious especially when
it comes to unbinding data. This article demonstrates a
powerful extender control that can provide easy to use two-way databinding
semantics. Using the control you can easily bind and unbind any control
properties to any data field or property of an object with full control
over binding, unbinding and dealing with binding errors at runtime. The article
demonstrates the control functionality and discusses the design of building an ASP.NET
2.0 extender control that provides the flexibility to extend any existing controls
on a Page, Master Page or
User Control.
Article is published on MSDN
Integrating Electronic Payment Processing into ASP.NET
April 11th, 2006
Find out to integrate Credit Card processing into your
ASP.NET applications. This long article starts at the beginning
discussing how the actual payment processing works from the provider
level and delves into details with specific implementations for several
common gateway services and a set of classes you can use for payment
processing. Finally an example shows how to integrate these classes in a
live application.
Advanced FoxPro COM Interop Article Series
December 26th, 2005
Are you using COM Interop from Visual FoxPro to communicate
with .NET? This series of articles takes you
through some of the scenarios you are likely to run into once you go
beyond the basics of calling simple COM objects and show more
sophisticated .NET functionality that you can take advantage of in your
FoxPro code with a little extra work.
-
Passing objects between FoxPro and .NET COM Components
-
Handling .NET Events in FoxPro via COM Interop
-
Creating multi-threaded components for COM Interop
A low-level Look at the ASP.NET Architecture
July 18th, 2006
Ever wonder how requests get into the ASP.NET pipeline from IIS?
Find out about the low level plumbing of ASP.NET starting with a
detailed discussion of how requests route from IIS, through the ASP.NET
ISAPI extension into the ISAPRuntime and finally into the ASP.NET
pipeline for HttpApplication processing with Http Modules and Handlers.
This article takes a on the low-level aspects of ASP.NET for those that
want to understand the inner workings of the framework.
Building a better Application Configuration Settings Class
July 18th, 2006
NET provides rudimentary support for storing and retrieving
configuration settings out of .config files. But there are a number of
important features missing. Find out how to build a better mousetrap by
creating a class that provides strong typing, read/write capability and
encryption for values stored in your configuration files.
Using Unicode in Visual FoxPro Web and Desktop Applications
July 18th, 2006
Visual FoxPro doesn’t have native Unicode support which means
that you have to do some extra work and understand how the process works
in order to work with it. In this article I’ll describe the issues in
the context of supporting of multiple languages simultaneously, rather
than through the view of code page translation which Visual FoxPro
readily supports. I’ll start with an overview of the issues and how to
work with Unicode in general, then show how to retrieve and update
Unicode data using Visual FoxPro and SQL Server data. Finally I'll talk
about how to get the Unicode content to display both in your Web and
Desktop user interfaces.
PayPal Integration into e-Commerce Solutions with ASP.NET
September 19th, 2004
PayPal provides one mechanism to process payments on the Internet.
While it's not the first choice for payment processing for typical
e-Commerce sites it does provide additional choices for those customers
that don't feel comfortable paying by credit card over the Web. It's
also an easy solution for first time Shop owners who might not want to
invest in a full merchant account. This article describes PayPal
integration from the perspective of a full featured e-Commerce
application and focuses on integrating PayPal seamlessly into this
environment. The article also provides a PayPal helper class
(ASP.NET/C#) and a skeleton sample application that demonstrates the
process and makes it easy to hook your own code into. Although the code
provided is .NET, the concepts in this article apply to any Web
development environment.
Calling .Net Web Services for Data Access from Visual FoxPro
July 7th, 2004
Find out how to create a .Net Web Service that serves up data
in a variety of ways, then see how to consume this data with Visual
FoxPro. .Net Web Services are easy to develop, debug and deploy, but
consuming the data, especially with Visual FoxPro is not always as
straight forward as you think. This article discusses how to pass
complex data between .Net Web Services and Visual FoxPro and provides
several tools to facilitate and standardize the process of building
solid Web Service clients for your applications.
Building a Web XML Data Service with Visual FoxPro
March 5th, 2004
Have you ever wanted to build a remote data access mechanism
into an application where you can talk to data that is coming over the
Web rather than from a local or network data source? Wouldn’t it be cool
if you simply pointed at a URL and could remotely execute some SQL code
and return data to you on the client? In this article Rick shows how to
build a generic Web Sql data service that can be used with any Visual
FoxPro based Web backend and any Visual FoxPro client to provide remote
data access to Visual FoxPro and ODBC datasources.
Using the Shell API and Internet Explorer Components with VFP
August 8th, 2003
Want to integrate external content into your Visual FoxPro
desktop applications? Then look into the Shell APIs that allow using
Windows components easily in your own applications. This article digs
into using the ShellExecute API, the InternetExplorer.Application COM
object and the Microsoft Web Browser ActiveX control for displaying Web
and Windows content dynamically in your own applications. Article
includes lots of short immediately useful samples and a detailed
reference of how to use the HTML DOM object model from VFP.
Web Farming with Network Load Balancing in Windows Server 2003
June 4th, 2003
Hit the limits of your hardware for a Web application? Find out how to
scale out your application to run on multiple machines using the Windows
Server Network Load Balancing Service. Windows Server 2003 brings a new
front end to the Network Load Balancing Service that makes it easier and
cheaper to implement a Web Farm of multiple redundant servers that can
work in tandem to handle the meanest traffic you can throw at it.
Using the ASP.Net Runtime for Scripting in Desktop Applications
June 4th, 2003
Want to embed the power of ASP.Net into your application to provide
rich and dynamic HTML displays in your applications? Add the ability to
dynamically execute script code that is changeable after compilation?
Don't want to give up debugging and the rich VS environment even in script
code? Then take a look at hooking the ASP.Net runtime into your own
applications. This article describes what it takes to integreate the
ASP.Net runtime in desktop apps and provides an easy to use class that
makes integration a matter of a few lines of code.
Creating a custom Statusbar Control in Visual FoxPro
April 20th, 2003
Irritated by the lack of Theme support and inconsistent
behavior of the Statusbar control in MSCOMCTL.OCX? This article
describes how to take advantage of a number of Visual FoxPro 8's new
features to build a useful replacement to the MSCOMTL statusbar control.
Besides showing off some new VFP features like collections, BINDEVENTS,
the new Empty object and ADDPROPERTY, it provides a ready to use class
that provides the most common functionality of the StatusBar with VFP
code.
Using .NET Components via COM from Visual FoxPro
January 2nd, 2003
This article describes how to use .Net components from unmanaged
applications such as Visual FoxPro or Visual Basic. The topics describe
the basic process of creating .Net components and exporting them to COM
and then delves into additional topics of how to pass and access various
special types passed over the COM boundaries. In addition, the article
also points out a number of things to watch out for such as debugging,
installation, dealing with type issues and more.
Calling VFP COM components from ASP.NET
January 1st, 2003
Find out how to call VFP COM components from .Net and
specifically ASP.Net. The article introduces the basics of importing COM
components into .Net and then referencing the component. It also touches
on how to pass various types of data between VFP and .Net when import
types don't work. You'll also learn how to debug COM components from ASP/ASP.Net
as well as the performance implications of using VFP components in ASP.Net.
.NET Interop for Visual FoxPro
Sept. 23, 2002
Find out how you can use VFP code in .NET and how to use .NET code
in Visual FoxPro, in this comprehensive article that covers a number of
different ways that you can integrate Visual FoxPro and .NET. The main
three areas that are discussed are using the VFP OleDb provider, COM
Interop both calling VFP components from .NET (and ASP.NET specifically)
and calling .NET components from VFP and finally using Web Services for
interop. The document points out some pitfalls and workarounds and tricks
for working with data retrieved from .NET. This article is very detailed
and hence fairly long at 45 printed pages.
Dynamically executing code in .NET
Sept. 8th, 2002
This article discusses in detail how to execute code dynamically
by creating code and compiling it at runtime. This is a useful feature for
extending applications with user extensions or for adding support for
advanced templating. The article discusses the process of compiling code
and utilizing the new assembly. Also provided are classes that simplify
the process and an ASP like script parser that can be plugged into any
application with a few lines of code.
Automatic Code Updates over the Web with Visual FoxPro
06/26/2002
Ever have that sinking feeling when you find a critical bug in an
application that's gone out to a few hundred or more clients? How are you
going to update these installations without a lot of fuss and tracking
down customers with the bad news? This article describes how to build
automatic version checks and code updates into your desktop applications.
The detailed article discusses the process and provides a class that makes
this job easy.
Retrieve HTTP content with .NET
02/6/2002
This article discusses the .NET WebRequest and WebResponse classes
used to retrieve HTTP content over the Web in detail. In the process a
number of related .NET development issues are described including stream
handling, string encoding, using delegates, implementing events and
creating new threads to run HTTP requests simultaneously. The article also
provides a preliminary implementation of a wwHttp wrapper class that
abstracts many of the features of the .NET classes into a simpler front
end.
Run
Visual Foxpro Reports on the Web with Adobe Acrobat
02/6/2002
Ever wanted to run a Visual FoxPro report over the Web without
having to recode it in HTML or forcing it through some hokey HTML converter? Find out how
you can use Adobe Acrobat's PDFWriter software to generate reports on the fly and display
them on the Web. Looking like the real thing! This article discusses how it works and
provides a class simplify the process. This article and code has been
updated for Acrobat 5.0, AmyUni and ActivePDF drivers.
Passing data over .NET Web Services
12/7/2001
This article is a continuation of the introductory Web Services article
and expands with specific examples of passing ADO.NET DataSet objects over
Web Services to be consumed in a Windows Form application. The article
discusses the DataSet object in some detail and delves into how data is
consumed and displayed in the Windows Form environment along with a number
of related issues such as security.
Using the Office Web Components to create dynamic graphs
for GUI and Web applications
11/16/2001
Graphs can add significant impact to applications and you can use the
Office Web Components to generate graphs easily. This article shows how
the OWC work and provides a Visual FoxPro class that wraps the
functionality to generate charts directly from Fox cursors and arrays.
Creating
Web Services with .NET and Visual Studio.NET
6/8/2001
Find out how Web Services work and are created in the .Net framework. This
article introduces the concepts of Web Services, the technology and then
demonstrates how Web Services are created and consumed via several
examples. Source code available for download.
Running
long Web Requests with Asynchronous Request Processing
4/9/2001
Running long requests on a Web server can be problematic since
long requests can tie up valuable Web server resources and not give the
user feedback on the operation running. In this article Rick shows a
message based approach to offload long requests to application servers
while providing the browser with information on progress.
Configuring
IIS via code with the IISAdmin Objects
4/6/2001
As you build Web applications it's becoming ever more important
to configure the server under program control for install routines for
distribution and replication of functionality. This article shows how to
perform common tasks like creating virtuals and scriptmaps and a few other
tips that you'll need to create your own Web install wizards.
Building a
SOAP Web Service with West Wind Web Connection
10/26/2000
Find out how to build a Web Service that exposes Stock quote
information from a Web Serivce, then learn how to consume and use that
data in a variety of different environments. This article describes the
concepts of SOAP and Web Services and shows a live example you run online
and play with.
XML Data
Services in distributed applications
10/24/2000
Find out about generic XML Data Services that can provide data
directly to your client application. This article discusses the SQL 2000
XML features as well as a VFP based XML data server implementation that
lets you serve VFP and ODBC data from a VFP backend application.
Building distributed applications with XML messaging
10/20/2000
Have you been thinking about using XML in your applications,
but aren't quite sure why and how to use it intelligently? This article
discusses why XML is an important technology especially in the context of
distributed applications that run over the Internet. The article starts
with an overview and then jumps into practical examples that demonstrate
how you can easily convert VFP data and objects into XML and then move
this data over the Web via HTTP. Several examples show how you can share
and access this XML based data with just a few lines of code.
Load
Balancing Web Application with Windows 2000 Advanced Server
10/18//2000
Find out how to build scalable Web applications that span
multiple servers in a Web Server Farm environment. Windows 2000 Advanced Server ships with the Network Load
Balancing service that can handle
large amounts of traffic by spreading the load across multiple redundant
machines. Find out how to use this feature and what it means to your Web
applications.
Using SOAP to call Remote Objects
8/09/2000
Check out how to use Microsoft's Simple Object Access Protocol
(SOAP) toolkit to call remote functions and component methods over the
Web. This paper describes how to use the toolkit and how to create and
call components from Visual FoxPro as well as examples on how to create
custom SOAP clients.
Using
VFP COM components with Active Server Pages
10/24/99
Active Server Pages and Visual FoxPro both use objects to expose functionality
for your application development. This paper describes the basics and more advanced topics
on creating, debugging, installing, optimizing and maintaining COM VFP components in
Active Server applications. It also shows how to create more flexible Active Server
applications that take advantage of ASP's built in objects and ADO inside of Visual
FoxPro. You'll also find out how create objects in Visual FoxPro and use them inside of
ASP pages. There are also a few hints on debugging COM objects built in
VFP.
Stress Testing Web
Applications with Microsoft's Web Application Stress Tool
2/24/2000
As Web development is becoming more prevalent, the need to test
Web applications in order to determine the breaking points on a given set
of hardware becomes very important. Microsoft's Web Application Stress
Tool provides an easy way to test Web applications in a realistic
environment that simulates large numbers of users. This article describes
the test tool as well as discussing stress testing issues that you need to
think about when using it.
Using Microsoft Transaction
Server with VFP11/12/99
Microsoft Transaction Server is a big part of Microsoft's
Enterprise strategy, but the functionality and features of this powerful
system component is often misunderstood and misjudged. This article
discusses what MTS is and how it works and most importantly how it affects
your VFP applications in various scenarios.
Building
Distributed Applications over HTTP11/12/99
Tired of hearing about having to rewrite your applications with an HTML
interface? Tired of the limitations of an HTML based user interface? Here's some
information on how to take advantage of Visual FoxPro on both the client and the server
ends of the Web for building rich distributed applications that can take advantage of the
Web's architecture without HTML. Discusses HTTP data transfers, WinInet and specific
examples of how you can use this technology built into the FREE wwIPStuff
class available from this site.
Internet Enabling Visual FoxPro Applications4/22/99
Find out how to enhance your existing Visual FoxPro applications with Internet
functionality without having to do a full Web conversion. Learn how using a few
simple techniques that don't require much code can spruce up exsiting applications. This
document describes how to integrate Hyperlinks, Email, FTP and HTTP access, a few ways to
access data on the server, use DCOM to access COM objects on the server and use RDS to
connect to data over an HTTP connection.
Building Large
Scale Web Applications with Visual FoxPro6/3/98
This document contains my session notes from Visual FoxPro DevCon '98 and discusses some
of the issues involved in building a high volume Web site using a live site as an example.
The Surplus Direct site is discussed in
detail with descriptions of some of the issues of integrating FoxPro development with the
HTML design, dealing with server management and site analysis, scaling the site for
traffic peaks and ever increasing load and how to deal with security issues. This document
also talks about some of the new VFP 6.0 scalability features and how they affect server
operation.
Calling
Visual FoxPro COM objects from Visual C++10/18/98
Find out several different way of how you can access Visual FoxPro COM
objects from Visual C++. This white paper describes how to use native COM IDispatch calls,
using the ATL CComDispatchDriver class and using VC++ smart pointer type library imports
for accessing your servers. Also includes some discussion of how VFP COM objects are
implemented and some utility code useful for accessing COM objects.
Using
Microsoft's FoxISAPI 6/3/98
This document contains my session notes from the Visual FoxPro DevCon '98.
Discusses the basic mechanics of FoxISAPI and introduces by discussion a framework that
simplifies processing requests and generating output quickly.
Using Visual
FoxPro COM components with IIS 4.0 12/27/97
Things have changed for using COM/Automation servers with IIS in the latest
version. This document overviews what it takes to configure, debug and run your VFP COM
objects under IIS 4.0.
Accessing
Active Directory and the IIS Admin Objects with VFP 12/27/97
Active Directory is a new Microsoft Operating System service that allows a
common access interface to NT system components for resource and hardware mapping. Active
Directory will be prominent feature of NT 5.0, but it's implemented today for
administration of IIS 4.0 and Transaction Server. This article discusses how you can
access ActiveDirectory from VFP and a component that helps make the job easier.
Things have changed for using COM/Automation servers with IIS in the latest version.
This document
Database
Connectivity on the Internet with Visual FoxPro
9/14/97
Want to find out more about connecting databases in general and Visual FoxPro specifically
to the Web? This HTML document is based on my DevCon '96 session notes
and provides an overview on how to tie backend applications to Web pages. This document
also goes into some detail on how FoxISAPI, ActiveX Server and Web Connection work.Powerpoint slides are also available.
Calling
Visual FoxPro COM objects from Visual C++08/18/98
Find out several different way of how you can access COM objects through
IDispatch interfaces from Visual C++. This document describes how to use native COM
IDispatch calls, using the ATL CComDispatchDriver class and using VC++ smart pointer type
library imports for accessing your servers.