Category web-developmentTim Stanley

Migrating To .Net6 and Azure

Sep 02, 2022 EST

In 2022, I decided to make a significant update the the code base and hosting platform used by this site.  I decided to migrate to .Net 6 and host it on Azure.More...

2010 Era Blog Platform Retired

Sep 01, 2022 EST

This site (tim-stanley.com) was first started in February 2006. It first went publicly live October 8, 2007.  The engine used to power this site was used from 2006 to 2022. The main technology really hadn't been modified since 2010. Not bad for a sixteen year run.

In 2022, this site was updated, but this is a summary of the underlying technology that powered this site for sixteen years.More...

Use HostingEnvironment.MapPath

Jun 25, 2010 EST

When running a service under IIS, the HttpContext.Current object is not available, so HttpContext.Current.Server.MapPath will fail.

fileName = HttpContext.Current.Server.MapPath(fileName);

The solution is to use Hosting.HostingEnvironment.MapPath instead.

fileName = System.Web.Hosting.HostingEnvironment.MapPath(fileName);

Custom Controls In ASP.NET

Feb 26, 2010 EST

ASP.net has that neat little feature where all the controls can start with <asp:.  It makes it easy to code.  I had numerous custom controls and I always had to register the control on each page to use it.  Scott Guthrie had a great tip on how to register the controls in the web.config file so that it doesn’t have to be done in each page.More...

Windows Live Writer XMLRPC and BlogEngine.Net

Feb 26, 2010 EST

BlogEngine.Net supports XMLRPC and the MetaWeblog API.  This allows it to support other tools like Windows Live Writer.  But where are the specifications for the API and WLW found?  I came across some interesting related links along the way in trying to figure out how to add proper slug support for pages in BlogEngine.Net.More...

MSDN Style Class Documentation

Jan 20, 2010 EST

NDoc is dead. Long live NDoc! How to generate MSDN style documentation using Sand Castle on Visual Studio 2008. More...

Field Codes

Jan 02, 2010 EST

Using field codes to replace values in content, templates, and reports allows users and designers a great deal of flexibility for creating and managing content and templates without requiring code changes.

This article is a summary of how to use field codes in content, templates, or reports and how to convert them to object property values and format and replace them when displayed or rendered.  This is based on a similar pattern that Microsoft Word uses when formatting fields.  It’s also commonly used in WordPress and WordPress themes.More...