Chris Pietschmann

husband, father, hacker, entrepreneur, futurist, innovator, autodidact


Subsite Rewriting HttpModule for ASP.NET

Here's some simple code for easily adding Subsite functionality to an ASP.NET website using UrlRewriting/UrlMapping. Urls are rewritten in the following fashion: ~/jdoe/default.aspx  => ~/default.aspx?site=jdoe ~/jdoe/subfolder/default.aspx => ~/subfolder/default.aspx?site=jdoe And this is all done by the 65 line HttpModule below: [code:c#] using System; using System.Web; /// <summary> /// Summary description for SubsiteRewriteModule /// </summary> public class ... [More]

ASP.NET 2.0: RewritePath breaks HyperLink's ImageUrl in App_Theme file when path with slash is rewritten

Rewriting a path with a slash ("/") in it will cause a HyperLink's image specified in the ImageUrl property within an App_Theme file to not be displayed. This can also lead to a "Cannot use a leading ..." error when running the website within IIS. Here's a screenshot of the issue occuring:   This is kind of a strange bug, since doing the same thing with an Image works just fine. It's only the HyperLink that breaks. I experienced this issue the other day, and it took me a little bit ... [More]

Official Release of Simplovation and Web.Maps.VE!

I am proud to announce that I have just officially launched Simplovation and released our first product, Web.Maps.VE! What is Simplovation? Simplovation is my new startup, and is a Micro-ISV. Our focus is on developing first class, resuable components and developer tools that target the .NET Framework. What is Web.Maps.VE? Web.Maps.VE is the latest, much evolved version of my open source control. This is the only ASP.NET 2.0 server control that brings Full AS... [More]

Microsoft to release .NET Framework 3.5 as Shared Source!

Scott Guthrie announced on his blog today, that Microsoft will be releasing the source code for .NET 3.5 as shared source under the Microsoft Reference License (MS-RL). You will also be able to enable debugging support within Visual Studio 2008 for the .NET Framework. This is really cool. I have always used .NET Reflector to peek into the source of the framework, but now I'll actually be able to look at the code itself. More Info:Releasing the Source Code for the .NET Framework Libraries ... [More]

Links - 2007-09-26

Here's a ton of links to articles and stuff that I've come across. Included are some links that I marked as favorite within IE and just haven't seemed to go back to, 'till today. It's probably link overload, but hopefully you find some of it usefull. ASP.NET A Boilerplate HttpHandler - Scott HanselmanDynamically resize uploaded images & save in PNG format - Anil RadhakrishnaMaking sense of ASP.NET Paths - Rick StrahlRendering ASP.NET Controls Out of Place - Dave ReedMake Your ASP.NET ... [More]

ASP.NET Forums is gone and Community Server's not free

What happened to the download links for ASP.NET Forums on the website? As soon as Community Server 1.0 came out the links disapearred. I didn't really think of it at the time, but now that I want to set up a Forum I would like the old ASP.NET Forums. Why not Community Server? Well, the reason I don't want to use Community Server is because the licenses keep getting more restrictive with the release of each new version. I just looked at the website and ... [More]

ASP.NET AJAX: Extensions to standard JavaScript base types

Working with JavaScript can be a challenge at times, and there are a number of helpful things that the ASP.NET AJAX Extensions are bringing to the table. One of the things it does is extend some of the standard JavaScript base types with additional functionality. This is actually rather neat, and is something that you may not find unless you dig through the ASP.NET AJAX documentation like I did. Array There are a number of extensions made to the Array base type, including "add", "remove" and ... [More]

ASP.NET AJAX: Use "custom" objects as Extender Control Properties

I’ve been working with the ASP.NET AJAX Extensions a lot lately, and have been learning a few trick on how to get stuff done. One of the things I’ve learned is how to create a Generic TypeConverter for ASP.NET Ajax to use when serializing my server-side objects to JSON when passing them down to the client-side. Introduction When creating an ASP.NET Extender Control (using ASP.NET AJAX and the AJAX Toolkit) you can add custom properties to your Extender (using the ExtenderCont... [More]

Learn ASP.NET Provider Model By Example via BlogEngine.NET

I was looking through the code of the new BlogEngine.NET project last week, and noticed that it implements the ASP.NET Provider Model. Cool an example I can study! I've been trying to spend some time lately to learn more about design patterns, so this was an interesting find for me. If you look at the code for BlogEngine.NET you'll see that it is a rather simple application that demonstrates a working implementation of the ASP.NET Provider Model that you can learn from. Go check out the code a... [More]

PietschSoft.VE: Is it Dead? What about Ajax and Virtual Earth v5?

Is PietschSoft.VE Dead? I've had a couple people ask me lately if the PietschSoft.VE project is dead since there hasn't been a release in about 2 months. The answer is: No, it isn't dead, I just haven't had alot of time the last few weeks to work on it. Ajax I am actually still working on adding full Ajax support, using UpdatePanels as the enablers. It is turning out to be pretty cool. Virtual Earth v5 Also, since Microsoft recently released Virtual ... [More]

AjaxControlToolkit TabContainer: TabPanel.Visible="False" should not display header text

If you set the visible property of TabPanels within your TabContainer to false, it still shows the Header Text in the page when rendered. What should happen is any TabPanels with Visible set to False should be hidden. A fix for this has been posted to the AJAX Control Toolkits Issue Tracker, but we have to wait for the next release to get the fix in place. Is there a work around? Below is an Inherited class I created using the fix described to allow me to fix this issue myself u... [More]

Why not make ASP.NET Web Matrix shared source?

ASP.NET Web Matrix was the Free ASP.NET editor back in the .NET 1.x days. The tool is actually still available for download. The other day, I was thinking... Why doesn't Microsoft make ASP.NET Web Matrix available as Shared Source? Web Matrix was a really cool tool, and it's obviously been rendered obsolete by Visual Studio Express. However, there are still alot of really cool things done in the code, and I think it would be beneficial to the community if the source code were made available. ... [More]

PietschSoft.VE v2.0.0 Alpha - ASP.NET AJAX Virtual Earth Mapping Control

Finally, v2.0.0 Alpha is out! PietschSoft.VE is an ASP.NET AJAX Virtual Earth Mapping server control. The main purpose of the project is to provide ASP.NET 2.0 developers with an easy to use Virtual Earth mapping server control. This control abstracts away the requirement of JavaScript knowledge when utilizing MS Virtual Earth mapping within your ASP.NET 2.0 web applications. It's been way too long since I've put out a release of my PietschSoft.VE ASP.NET Virtual Eart... [More]

My first look at VS'05 Team Edition for Software Testers

I've been meaning to dig in and get to know unit testing for quite some time now. Tonight I dove in and took a look at the Visual Studio 2005 Team Edition for Software Testers. Unit testing is actually quite easy to do. The Getting Started with Team System Testing Tools section in the MSDN library has some nice How-To's on getting started with unit testing using VS'05 Team Edition.

Scott Guthrie interviewed on Hanselminutes

Scott Hanselmen interviews Scott Guthrie (ScottGu) covering Ajax, ASP.NET 2.0, extender controls, CSS adapters and more. I'm sure you know who Scott Guthrie is, but just in case you don't: He's a General Manager within the Microsoft Developer Division, and he heads up the dev teams that work on .NET CLR, .NET Compact Framework, ASP.NET / Atlas, Windows Forms, WPF, IIS7, Commerce Server, Visual Web Developer and Visual Studio Tools for Avalon (WPF). Download here: Hanselminutes: <Scott ... [More]

ASP.NET: Extend BoundField Control - Add MultiLine support

I've been working with the data controls and it's somewhat cumbersome to use a TemplateField control everytime you want to just have a MultiLine TextBox. So, I decided to extend upon the BoundField control to add MultiLine support. It is actually rather simple to do. Using the BoundTextBoxField control in the page: <%@ Register Namespace="CustomBoundField" TagPrefix="custom" %> <asp:GridView ID="GridView1" runat="server"><Columns><custom:BoundTextBoxField ... [More]

VirtualPathProvider: Store .ASPX and .HTM files for your application in xml file or database

With the VirtualPathProvider you can server pages from your website without the files actually existing on the disk. And this doesn't use url rewriting. The VirtualPathProvider actually allows you create your own virtual file system within your application. You can store the pages of you site within an xml file, a database or any other method you would like. In my opinion this is one of the coolest new features in ASP.NET 2.0. The virtual file system you create can store virtually any file that... [More]

I Found a bug in the Rating control in the Atlas Control Toolkit

I found a bug in the current release (60731) of the Atlas Control Toolkit. The bug I found is caused when you use the Rating control within a User Control and you have multiple instances of your User Control on a page. I hope this bug gets fixed soon, it sucks for someone who likes to make things reusable using User Controls. View the Work Item I add over at CodePlex

PietschSoft.VE3 v0.05 Released

Tonight I released v0.05 of the PietschSoft.VE3 Virtual Earth mapping control for ASP.NET. Major enhancements this release brings: Added GeoRSS and VECollection Layer support Added simple VS Design-Time support Added VEMap.VEMapJSInclude property so the control can be pointed to a Virtual Earth mapping .js file (a custom one) other than the one hosted by Microsoft. I'm trying to put out a new release with every couple features/fixes that are done. If you have any q... [More]

PietschSoft.VE3 is now on CodePlex

I am still hosting the demo site but I have moved the project into CodePlex. The CodePlex site offers a Discussion board (forums) and Issue Tracker. This will allow me to better support the PietschSoft.VE3 map control and library. I have also placed PietchSoft.VE3 under the Microsoft Shared Source Community License (SS-CL). I hope this will clear up any licensing questions regarding the use of this control. PietschSoft.VE3 - ASP.NET Virtual Earth Map Control

PietschSoft.VE3 v0.03 plus Demo site!

The PietschSoft.VE3 library is really taking shape and has been downloaded 100+ times already. I've even had someone contact me about using my code as the basis for a mapping control they need to create for a project they are working on. See it in action: In case you haven't heard of or seen this project; the PietschSoft.VE3 library is an ASP.NET server control that wraps up the functionality provided by  Microsoft Virtual Earth ... [More]

IIS7: Better Url Mapping support, well not yet...

Recently, I search for articles/documentation about Url Mapping in IIS7, but I couldn't find anything. So, I asked Scott on his blog, "What features does IIS7 offer for Url Mapping?" Scott replied with the following:The core IIS7 release provides all the infrastructure to do URL rewriting for all resources (ASP.NET, ASP, PHP, HTML, etc).The Vista release won't have a URL rewriting rules engine built-in -- although we are looking at making one available as a download in the future. I was going ... [More]

C# .NET: Convert System.Drawing.Color to HTML color

Here is a small example of how to convert a System.Drawing.Color to the HTML color format (Hex value or HTML color name value) and back. System.Drawing.Color c = System.Drawing.ColorTranslator.FromHtml("#F5F7F8"); String strHtmlColor = System.Drawing.ColorTranslator.ToHtml(c);

ASP.NET 2.0: v0.02 of my Virtual Earth v3 Ajax Server Control

Update (11/7/2007): This control is now located here: I just uploaded a new release (v0.02) of my ASP.NET 2.0 Virtual Earth v3 Server Control. The download contains a Visual Studio 2005 solution that contains the source code for the server control dll and a sample website that uses the control. The only new feature in this release is full ViewState support. I do plan on adding many more features to this control as I get time to work on it. Enjoy! Down... [More]