2005 2006 2007 2008 2009 2010 2011 2015 2016 2017 aspnet azure csharp debugging elasticsearch exceptions firefox javascriptajax linux llblgen mongodb powershell projects python security services silverlight training videos wcf wpf xag xhtmlcss

NetFXHarmonics Subversion Repository Update

Today a did two things that compel me to give a very short update.

First, I created a permanent and unchanging version of the Data Feed Framework in the tags/ section under February2007/. This release is the original February 2007 release and it's what you could call is the "stable" release. All version of the DFF will be stable in terms of technology, but this is also stable in terms of documentation. You can be assured that when you download the Data Feed Framework from the trunk/ that you will be getting a solid version, but perhaps the API changed and you want a specified version for that API. Well, when the API interfaces changes, then that's a new version and I will tag that one as well. So, for now there is a tagged release called February2007/ which you may use in production at any time (as other are doing already). You may get this from the following location:

Second, I added an index to the my SolutionTemplate/E-Book. This file is the LessonIndex.txt file in the project repository. This file lists only the full-length lessons and as I write more full-length lessons I will be adding on to this file (today, I added a lesson on HttpHandlers and another on HttpHandlerFactories and added them to the index.)

Also, for you convienence here is that index:

Working with Global.asax

SolutionWebsite: App_Code/SampleHttpApplication.cs

Creating ASP.NET HTTP Handlers

SolutionWebsite: App_Code/ServiceHttpHandler.cs

Creating ASP.NET HTTP Handler Factories

SolutionWebsite: App_Code/SampleHttpHandlerFactory.cs

DOM Manipulation

SolutionWebsite: Code/SampleDomManipulator.js

JavaScript Events and Anonymous Functions

SolutionWebsite: Code/Initialization.js

JavaScript Namespaces

SolutionWebsite: Code/SampleStructure.js

JavaScript Closures

SolutionWebsite: Code/SampleStructure.js

Firefox Console

SolutionWebsite: Lib/Debug.js

JavaScript Loosely-Coupled Multicast Events

SolutionWebsite: Lib/Events.js

.NET Tracing

SolutionWebsite: Services/SampleAsyncSchemaService.aspx.cs

Custom Config Sections

SolutionWebsite: /Includes.js.aspx

ASP.NET MasterPages

SolutionWebsite: /MasterPages.master.cs

Using XAG

SampleLibrary: Config/JavaScriptImport.cs

Client-Side Type Organization

Introduction.txt

CSS Architecture

Introduction.txt

Framework Design

Introduction.txt

You can access my SolutionTemplate/E-Book at the following Subversion repository path:

Minima, DFF, and SolutionTemplate/E-Book now in Subversion

I've recently realized how lame it is to have to download a new ZIP file each file a new version of a framework is released or when a project has some changes. So, I'm moving my projects to Subversion instead of making everyone download my ZIP files. This should help me update the projects more often and allow everyone else to get my projects easier. Please note that this replaces all RAR/ZIP files I've previously released.

Currently, I have the following projects in Subversion:

  • Minima
  • Data Feed Framework
  • NetFXHarmonics .NET SolutionTemplate With E-Book

You can access these projects with any Subversion client, though you would probably want to use TortoiseSVN for Windows development. You can access the projects at the following SVN HTTP addresses. You are free to also use these SVN HTTP locations to browse through the code in your web browser. My primary emphasis is in .NET training and education, so I do hope this helps. Also, given that my SolutionTemplate is also my e-book, you can easily look at the files there and read them online without having to download the project.

Note the /trunk/ path at the end. There are currently no projects in the tags section of the Subversion repository and, honestly, I'm still planning what to do with that section. The branches section is currently set to not allow anonymous access.

By the way, if you're unfamiliar with it, Subversion is an incredibly powerful and seamlessly easy to use revision control system that allows for code repositories (that is, code stores) to be stored in a centralized local to allow access from diverse locations. Subversion also does automatic versioning of your commits (that is, saves) to the code repository. Not just versioning as in a magic number change, but also as in it saves all versions of your files so you can go back and see your changes over time.

Subversion is used for many different reasons and some of them have nothing to do with code. For example, I've been using something similar to it (CVS) for a rather long time now to store all my documents so I can keep everything stored in a centralized location and so I can see the progress of my work. One use that I found rather interesting was that one company was using Subversion to store and provision new instances of their application. So, you can use it as a place to store your code, as a global file system, or as an application repository. Subversion stores whatever you want to store, including binary files. For more information on Subversion, see the online O'Reilly e-book "Version Control with Subversion" below.

Related Links

Disabling IIS6 Socket Pooling

Yesterday I ran into one of the worst features of any program ever. In an attempt to setup Subversion on Apache on Windows, I found that Apache couldn't start on the specified IP address using port 80 even though NONE of my IIS6 websites were using this particular IP address. Well, after banging my head against the wall for about an hour, I realized that even though IIS was told to use SPECIFIC addresses for each website, it felt the need to take over ALL the IP addresses on my ENTIRE system!

After a bit of research I found that this "feature" is called Socket Pooling and has been driving people nuts for a while. So, in my attempt to research how to get around this "feature", I found numerous articles online including one on TechNet describing in PARTIAL detail how to fix the problem. Not a single one of the 10+ articles I read explained how to fix this problem correctly.

Here is how you fix this "feature":

Basically you need to tell IIS6 exactly what IP addresses it is allows to use. By default it thinks it has the right to take over ALL your IP Addresses. Not sure why someone thought that was a good idea, but ok...

To tell IIS6 exactly what IP addresses you want to use, thereby freeing up all other IP address, you need the httpcfg.exe utility that comes in the Support Tools on your Windows Server 2003 disc (for R2, it's disc 1) at the follow path:

\SUPPORT\TOOLS\SUPTOOLS.MSI

In my situation, my dedicated hosting service didn't feel that I would EVER need to use ANY of the utilities installed by SUPTOOLS.MSI, so I was stuck there. Furthermore, after wasting about a half hour on searching my closets for a Windows Server 2003 trial disc, I realized that I needed a new plan. If you find yourself in a similiar situation, you can install the Windows XP SP2 Support Tools on your local machine and upload httpcfg.exe to the server. No other files are needed. The Windows XP SP2 Support Tools download is a free file downloadable from the Microsoft website.

After you have httpcfg.exe on the server, get to a command line and get httpcfg.exe in your path (I put the file in the Windows folder).

Now you need to decide what IP addresses you want IIS6 to use. This is where I kept getting confused. Because the default model of IIS6 is to greedily takeover ALL IP addresses, I kept thinking that I wanted to give IIS6 an EXCLUSION. All the articles make it sound like that. All the articles I read made it sound like that was the case. So I kept using httpcfg.exe to include an address in an exclusion list. Well, that's not how it works and the articles should have explicitily stated that. In reality, you tell IIS6 what specific IP addresses you want IIS6 to use and by doing so you are naturally disabling the "feature" of socket pooling. Moving on...

Use the following command to give IIS6 an IP address you would like for it to use (clearly 10.1.1.1 is just an example):

httpcfg set iplisten -i 10.1.1.1

Repeat that for EACH IP address you want IIS6 to use.

If you accidentally set an IP address that you didn't want to add, then you may use the following sample command:

httpcfg delete iplisten -i 10.1.1.1

If you want to see what addresses you have set, use this command:

httpcfg query iplisten

Then STOP the http service by:

net stop http /y

Then START the W3C service by:

net start w3svc

Now your IIS should be running and you should be able to start other web servers as well on different IP addresses. Now, if you find that one of your websites will NOT start and showed up as "stopped" when the other websites started fine, then the IP address for that specific site was not added via httpcfg and you need to do so for that website to start. If that website is using an IP address that Apache or something else is using, you need to choose a different IP address. It's not that big of a deal. That's what DNS was for and if you are using DNS and not just handing out IP addresses, then you won't have a problem.

As a final note, if you are on IIS5 for some reason, then, well, you should upgrade, but say you can't upgrade for some reason, then you too have this same socket pooling "feature", but it's disabled differently. I haven't tried it myself on IIS5, but according to the documenation, you can disable all IIS5 socket pooling by openning a command prompt window and moving to the \Inetpub\AdminScripts folder, then running the following command:

cscript adsutil.vbs set w3svc/disablesocketpooling true

If you see the following response, then you are good. Just stop IIS, then restart IIS and the WWW service to come back online.

disablesocketpooling : (BOOLEAN) True

This method will give you the same nice and happy message on IIS6 as well, but it's just a show intended to give you a false sense of acomplishment and doesn't actually disable socket pooling at all. This method only works for IIS5. You need to use the httpcfg.exe method described above for IIS6.

Firefox 2.0 Bookmark Auto-Backup

The other someone called me up telling me their world has come to and end because they came home to find that someone accidentally deleted all their Firefox bookmarks. The situation was rather serious to them, which is understandable as no one likes to lose anything, so I went over to their place to see what I could do for them. Sure enough the bookmarks were gone, but...

...much to by delight (and their's), I found that Firefox 2.0 keeps automatic backups of your bookmarks for the past 5 days. I found all their bookmarks in the following folder:

%appdata%\Mozilla\Firefox\Profiles\<random stuff>.default\bookmarkbackups

So, I was able to import their bookmarks from a backup and BAM... happiness. That's just a down-right awesome feature that MANY more applications should have. Firefox 3.0 has a new bookmark system called Places which uses SQLite (an open source relation database system) to manage its bookmarks and it should be interesting to see what techniques they use in their final release.

NetFXHarmonics SolutionTemplate/E-Book

Recently I started putting together my standard .NET solution template for public release. This template contains the base architecture and functionality that all my projects need. This template is also organized in a very clear way that clearly separates each type of element into it's own section to maximize expansion and ease of development.

In order to make sure that the solution is understandable by many different types of developers, there are commentaries in each file in the solution. In addition to this, many of the files have full chapter-length lessons on a development topic contained in that file. For example, in the Code/SampleDomManipulator.js file, I wrote a rather extensive introduction to JavaScript browser dynamics through DOM manipulation. Because of these lessons, this solution template is also living .NET e-book.

Here is a list of some of the topics I've written about in this first release of my solution template, some of them are simple explanations and others are lengthy detailed lessons.

  • HttpHandler Creation
  • HttpModule Creation
  • HttpHandlerFactory Creation
  •  
  • Custom Config Section Creation
  • .NET Tracing
  •  
  • MasterPages Concepts
  • Global.asax Usage
  •  
  • CSS Theming, Management, and Media-Specific Sheets
  •  
  • JavaScript Namespaces
  • JavaScript File Consolidation
  • Firefox Console Usage
  • JavaScript Anonymous functions
  • JavaScript Multicast Event Handling
  • DOM Element Creation
  • DOM Element Manipulation
  • DOM Element Deletion
  • JavaScript Event Handling with Low Coupling
  •  
  • JavaScript GET/POST XmlHttp Service Interop
  • Manual XmlHttp Service Creation
  •  
  • JavaScript/CSS/ASP.NET/C# Code Separation
  • Highly Cohesive Type Organization

This solution template could be used for the basis for production projects or as a training utility for people new to ASP.NET, people new to JavaScript, DOM Manipulation or AJAX or people who just want to learn how to organize their projects more effectively.

As with all my projects, but much more so with this one, I will be updating the solution template over time to account for more AJAX techniques and .NET technologies. I will also continue to expand the commentaries and lessons to the point where this solution itself becomes a case study, a sample application, and book all wrapped up in one.

Links

Powered by
Python / Django / Elasticsearch / Azure / Nginx / CentOS 7

Mini-icons are part of the Silk Icons set of icons at famfamfam.com