Hosts File Manager extension for IIS 7

I’ve just released the first version of my new side project, the Hosts File Manager extension for IIS 7. The extension does pretty much what it says on the can, providing a user interface to edit the local hosts file from within IIS Manager. Running from within IIS gives me a few other benefits, too, like auto-elevation and providing me easy access to local website information.

For now, there’s only a global view (accessible from the default “server” view in IIS Manager), but I have more features planned for future releases. You can read about these on the Codeplex project page.

To download it, head over the Downloads page on Codeplex. I’ve released both x86 and x64 versions, but all my testing has been done with the x64 installer (since I’m running 64-bit Win7). Please log any x86 or Vista issues with the Issue Tracker.

Posted in Uncategorized | Leave a comment

Debugging IIS 7 extensions in Windows 7

I came across some curious behavior when trying to debug an IIS extension that I’m working on. When I went to select “InetMgr.exe” as the startup program, it wasn’t there. I checked the folder using Windows Explorer and, sure enough, there it was. Even entering the path manually resulted in “The external program cannot be found”.

So, what was the problem? Well, as far as I can tell, it appears that because InetMgr.exe is an auto-elevated process it is only accessible to other auto-elevated processes. This is quite possibly a post RC solution to the flaw in UAC found during the betas, though I’m just speculating.

Luckily, with a bit of experimenting, I was able to find a solution. By enabling remote debugging (“Use remote machine”) and setting the value to localhost, I was able to circumvent whatever was blocking the call. See the below screenshot for clarification.


Debug settings for InetMgr.exe

I am now happily debugging my extension without hassles.

Posted in Uncategorized | 2 Comments

Enable net.pipes in IIS 7 on Windows 7 Professional

I recently went to configure a net pipes service in Windows 7 (Professional 64-bit) and found that it wasn’t available. I quickly proceeded to “Turn Windows features on or off”, but couldn’t find it there either. I eventually found the answer in the Microsoft article WAS Activation Architecture and have simplified the steps below:

  1. Open %windir%\system32\inetsrv\config\applicationHost.config with (elevated) notepad
  2. Find the element
  3. Add a new element with a name attribute of “net.pipe”

The final element should look like this (assuming you have no other listener adapters enabled):


Edit: While the above solution enabled net.pipe in the bindings dialog in IIS, it didn’t actually enable net pipes in IIS. I did, however, find the correct way of enabling them:

Simply install “Windows Communication Foundation Non-HTTP Activation” from the “Microsoft .NET 3.5.1″ section in the “Turn Windows features on or off” dialog.

Posted in Uncategorized | Leave a comment

ASMock Beta 2 Released with Tutorial Series

ASMock beta 2 has been released and, other than Flash 10 Vector support, is largely a bugfix release. I’ve also added a seven part tutorial series on how to use the framework.

As always, any feedback can be added to the bug database or feature request trackers. Additionally, any feedback to the tutorial series (or requested examples) can be added to the SourceForge forum for the project.

The ASMock binary, source and FlexUnit samples can all be downloaded from the downloads page.

Posted in actionscript, asmock, flex | 3 Comments

Generics (Vector) in the AVM2

So I finally got around to looking at vector’s in the AVM2 yesterday (for asmock) after someone logged a bug and found that the Flash 10 features are not actually documented in the AVM2 Overview document. Fortunately, after some digging around, I uncovered enough to implement support. Here’s what I found:

References to a typed generic type (Vector. as opposed to Vector.) are referenced by a new multiname kind (0x1D), which I call GenericName. GenericName has a format like so:

[Kind] [TypeDefinition] [ParamCount] [Param1] [Param2] [ParamN]

Where:
[TypeDefinition] is a U30 into the multiname table
[ParamCount] is a U8 (U30?) of how many parameters there are
[ParamX] is a U30 into the multiname table.

Obviously generics are not generally supported yet, so ParamCount will always be 1 (for Vector.).

The other interesting thing is how instances of the class are created. A new opcode was added in Flash 10 (0×53), which I will call MakeGenericType. MakeGenericType is declared with the following stack:

TypeDefinition, ParameterType1, ParameterTypeN -> GenericType

It also has one parameter, a U8 (U30?) specifying how many parameters are on the stack. You will generally see MakeGenericType being used like this:

GetLex [TypeDefinitionMultiname]
GetLex [ParameterTypeMultiname]
MakeGeneric [ParamCount]
Coerce [GenericNameMultiname]
Construct [ConstructorParamCount]

So if you had the following…

GetLex __AS3__.vec::Vector
GetLex int
MakeGeneric 1
Coerce __AS3__.vec::Vector.
Construct 0

You would now have an instance of Vector.

Posted in avm2, flash10, vector | 2 Comments

ASMock Beta 1 Released

I’ve just released a beta of ASMock, the dynamic mocking framework for ActionScript 3 that I’ve been working on. The API should be familiar to users of Rhino Mocks as it is a port of it (albeit with some changes).

More information can be found at the ASMock homepage

Posted in actionscript, asmock, flex | 1 Comment

Braid

I try to keep my blog programming related (for some reason), but I feel I have to bring to light to that one guy somewhere who reads my blog a new game for Xbox Live Arcade that came out last week called Braid, and it’s a difficult game to explain without selling short.

In its simplest form, Braid is a time-based puzzle platformer, but it is so much more than that. What it is, is the closest thing to art I’ve seen in a video game in a long time. The levels are water painted and swirl and shimmer in a subtle way that gives the feel of a dream. The music is beautifully orchestrated and is perfectly matched with the visuals (and even sounds good playing in reverse while you reverse time). The story is enigmatic, philosophical and deep. Who thought a 2D platformer could leave you thinking?

Last, but not in the slightest bit least, the gameplay is addictive as hell. Each stage has some of the greatest puzzles involving time I’ve ever seen. I think what is different in Braid is that time control is not a gimmick tacked on but the center of the game itself. For example, its impossible to die. When you are hit by an enemy or fall into a spike pit you simply reverse time. Once you get used to the mechanic, you’ll discover that the game is only 30% platformer and 70% puzzler.

I can’t really say anymore without spoiling anything (story or puzzle) but all I can do is strongly recommend you download the demo. At 1200 points it’s pretty steep but the demo gives you a good preview of the types of puzzles and a gimpse into the story. It might not be everyone’s cup of tea but for me it may just be one of the greatest games I’ve ever played.

Posted in gaming | Leave a comment