Friday, August 20, 2004

Mounting ISO images as drives in Windows

After a brief search on Google, I found that Microsoft released an unsupported tool that can mount an ISO image as if it were a read-only drive.

Here's a link an article on the topic.

Here's another to the utilitiy.

... too bad there's no source code. I'd like to see a native port of vnconfig.

Monday, August 16, 2004

Indigo and Service Transport Neutrality

I've been meaning to do a rant on the IPC solution that RPC/HTTP provides, and how it is not adequate for certain applications. After reading Don Box's interview with .NET Developer's Journal, it seems we are finally starting to see a mainstream effort to remove our dependence on HTTP for web services. Who says "the web" is limited to port 80?

Don Box pin-points the idea that there is a need to move away from HTTP as a transport for services in favor of a transport-neutral stack. This is a feature both Microsoft's Indigo and the IETF's BEEP.

It's a great idea, and I suspect Microsoft will be adding all sorts of goodies to the Indigo framework SDK to make IPC under Indigo simple to implement.

.NET Developer's Journal Interviews Don Box

...on his role at Microsoft. Here's an excerpt:

.NETDJ: I'm perfectly happy using ASMX for Web services - why should I care about Indigo?

DB: ASMX is the closest to "the truth" of all our shipping technologies for distributed computing. If you are doing service-oriented programming, ASMX is the easiest to use and the most likely to keep you on the straight and narrow. You have to work harder to do the wrong thing. .NET remoting is more unbounded and happily allows you to do both right and wrong things with equal ease.

There is nothing wrong with ASMX. It has some limitations. One of the limitations is that the current implementation is bound to ASP.NET and pragmatically, that means it is really about working over HTTP. It can work over other transports, but there is no easy way to do that...some assembly is required. So, as people want to use other transports, ASMX won't be enough.

ASMX also has a very coarse-grained extensibility model. SOAP Extensions allow you to replace pieces of the plumbing, but only with a very coarse-grained tool. If I want to see the actual bits as they go in or come out, or the stack frame, there are integration points exposed for this. However, if I want to see the intermediate XML, I have a lot of work to do. For example, Web Services Enhancements (WSE), has to do some fairly obscure back-flips in order to fit into this model and to do XML-based processing. The ASMX/WSE user doesn't see this, but it's definitely more work for us than it should have been.

Friday, August 06, 2004

Preparing IIS 5.0 for .NET

For some reason, the first time I installed .NET 1.x on an IIS 5 server, it just worked. I don't know if this was because I had done the install via Windows Update, or if the likes of a phenomenon occurred. .NET applications ran fine.

This time around, I installed IIS and downloaded and installed the framework manually. ASP.NET applications failed to work at first go.

After tooling through the IIS configuration, I noticed that none of the .NET extensions were registered in the mapping subsystem of IIS (e.g. extensions such as .aspx, .asmx).

Apparently, to fix this problem, one must change to the .NET framework root directory and run aspnet_iisreg.exe -i, which installs the extensions, mappings, and whatever else IIS needs to run ASP.NET applications.

I haven't had a chance to use IIS 6.0 yet.

Sunday, August 01, 2004

10 Must Have Tools for .NET

It occurred to me recently that I needed something to compile .NET code snippets... "what was that tool called?" I knew an article had been written on some very cool and useful tools for .NET development, but for some reason I never bothered to post it. I'm cutting myself slack... I'm still learning to blog.

Without further ado, Ten Must-Have Tools Every Developer Should Download Now.

http://msdn.microsoft.com/msdnmag/issues/04/07/MustHaveTools/default.aspx

Tuesday, July 13, 2004

Installing pf on FreeBSD...

This is very crude, but:

1. download kernel source.

ftp://ftp.freebsd.org/pub/FreeBSD/releases/5.1-RELEASE/src/ssys*,install.sh

2. install kernel source.

./install.sh ssys

3. modify kernel, add these options.

# Packet Filter support
options PFIL_HOOKS
options RANDOM_IP_ID


4. rebuild kernel

config IMPETUS && cd ../compile/IMPETUS
make depend && make && make install


5. reboot

6. download the ports collection

7. install the ports collection

8. install the PF port

cd /usr/ports/security/pf
make && make install


9. install the PF startup script

cd /usr/local/etc/rc.d
mv pf.sh.sample pf.sh


10. add the following to /etc/rc.conf

pf_enable="Yes"
pf_logd="Yes"
pf_conf="/etc/pf.conf"


11. update /etc/pf.conf with your PF rules, e.g.

block in all
pass in quick on { lo0 }
pass out quick all keep state

Friday, June 18, 2004

OpenBSD gets its SMP on...

SMP support is now in OpenBSD-current! -- link2

This has been a long time coming... congrats to the OpenBSD team.

Saturday, June 12, 2004

VIM and arrow keys under FreeBSD

For some reason in insert-mode under FreeBSD, VIM doesn't process the arrow keys (up, down, right, left) such that the cursor moves in the expected direction. Instead I was getting [ABCD] every time I hit (up|down|left|right), respectively.

Under OpenBSD, this works fine with the "pcansi" terminal setting (under FreeBSD I am using the "screen" terminal setting, but have tried others to no avail). I suppose I am still a little unclear why this happens on FreeBSD and not on OpenBSD, and how it can be fixed such that they both work. In the mean time, I solved the problem with the help of the VIM Tips portal.

http://www.vim.org/tips/tip.php?tip_id=550

The solution I used is the one suggested by the first comment. Here it is:

1. Create a .vimrc using VIM.
2. Enter the following.

set t_ku=[CTRL-V][UP-ARROW]
set t_kd=[CTRL-V][DOWN-ARROW]
set t_kr=[CTRL-V][RIGHT-ARROW]
set t_kl=[CTRL-V][LEFT-ARROW]

Where [CTRL-V] is the actual control-V keypress, [UP-ARROW] is the up arrow and so on.

3. Save and quit VIM.

When you restart VIM and enter insert-mode ("i"), the arrow keys should move the cursor and not display ASCII characters.

Sunday, June 06, 2004

OpenBSD gains pf source routing...

Cedric Berger has committed changes to the OpenBSD routing subsystem that allows packets to be routed based on their source address. Cool stuff.

Here's the commit message:

CVSROOT: /cvs
Module name: src
Changes by: cedric@cvs.openbsd.org 2004/06/06 10:49:09

Modified files:
sys/conf : files
sys/net : pf.c route.c route.h rtsock.c
sys/netinet : in.h in_pcb.c ip_icmp.c ip_input.c ip_output.c
ip_var.h
Added files:
sys/net : route_src.c

Log message:
extend routing table to be able to match and route packets based on their *source* IP address in addition to their destination address. routing table "destination" now contains a "struct sockaddr_rtin" for IPv4 instead of a "struct sockaddr_in". the routing socket has been extended in a backward-compatible way. todo: PMTU enhancements, IPv6. ok deraadt@ mcbride@

Sunday, May 09, 2004

Skipping Winamp audio? A potential solution.

For the life of me, I couldn't figure out why my lossless audio files were skipping when I would play them from my desktop over the network. They played fine from my laptop.

While tooling around in the Properties for my Local Area Connection, I found an Advanced setting called Connection Type that allowed me to set duplex. Even though the switch showed the connection from the desktop as Full Duplex, the desktop's Connection Type setting was set to Half Duplex. Setting this toggle to Full Duplex solved the problem-- and now audio files play smoothly from the desktop again.

This all wasn't a problem until I moved and stopped using a 100Mb hub (half-duplex). Sheesh.

Thursday, April 01, 2004

Discount Dedicated Servers

BTW, here is a list of providers that provide discount dedicated hosting.

http://www.fastservers.net/
http://www.managed.com/
http://www.servermatrix.com/
http://www.nocster.com/
http://www.ev1servers.net/
http://www.focalservers.com/
http://www.hosthideout.com/

New hosting arrangement...

We are now located at The Planet and thusly peered with 8 upper-tier ISPs. Our link to the Internet is now much sweeter.

The change is mainly to free up bandwidth on my cable modem, and to decrease latency for data transfers (e.g. pictures should display a lot faster now).

A bit of credit for the idea must be given to Dave, who mentioned it during a chat on New Years.

Sunday, February 08, 2004

Now serving... root!

I read this Molson Twin Label as "Now Serving root!", and thought it was amusing. Of course, none of my friends on that night quite got it.



If only Molson would go multiplatform with a "Now Serving C:\>!", I might start collecting these bottles.

Thursday, January 29, 2004

Substituting Gecko for MSHTML

Something I've pondered since switching to Firebird as my desktop browser is, "Wouldn't it be great to use the same engine as Firebird, as an alternative to the MSHTML engine, to render HTML in my applications?"

It appears Adam Lock had the same idea, and did something about it. The Mozilla ActiveX Control aims to be a (nearly) drop in replacement for the MSHTML interface.

Replace a string over a directory tree...

I received this tip from a coworker of mine, John Sutherland. Ever need to search and replace a string over a directory tree?

find . -name '*.html' -exec perl -pi -e 's/old text/new text/g' {} \;

Saturday, January 24, 2004

Xen and the Art of C# Query Programming

Microsoft has apparently publicized a research effort to combine XML and relational queries into an extension to C#, called Xen. Read the article on Extreme Tech.

Xen looks promising: It simplifies many common business logic operations that generally create code readability (and security) headaches.

From the article: Including XML constructs in the language will make programming Web services easier and should result in greater type-safety as well as increased code optimization--since the compiler will have intimate knowledge of the XML data structures and the functionality used to manipulate them.

BTW, this item was pulled from The Server Side .NET, a new community resource for .NET development, sponsored by a number of big name Microsoft-technology players (including Microsoft). I'll likely be pulling more information from that site in the future.

Friday, January 16, 2004

Relaying mail to a remote MTA with Qmail...

Up to now, I've sent email through my LAN's MTA, which uses the IP of my cable modem. Lately, it seems, there is a growing number of exchanges (such as AOL.COM) that no longer accept mail from these "dynamic" addresses. So, I needed a way to relay mail from my LAN's MTA to an alternate MTA that uses a static IP address.

To do this, I first had to add the IP address of my MTA to the remote MTA (with the static IP address) as an authorized relay. See the qmail faq for more information.

Next, I had to tell my local MTA to relay mail to the remote MTA. This is accomplished through the qmail/control/smtproutes file (see qmail-remote(8) for more information). Here is how I set it up:

localdomain.com:
:mail.remote.com


(Since I use my local MTA as a mail exchanger for localdomain.com, I added an entry here to allow messages to that domain to be delivered normally.)

All other email (mostly from my desktop) is relayed to mail.remote.com, which in turn relays it to the appropriate destination.

Now, email to addresses whose exchangers had previously denied my email is accepted.

Sunday, January 04, 2004

An Outlook-style Calendar: Month Control

I've written an Outlook-style month control in C# for public consumption. It's in its infancy. Please let me know if you make any improvements.

Here's a screenshot:



Click here to download

A Simple C# Logging Class...

I've written a simple, flat file, syslog style, thread safe logging class in C# for public consumption. Please let me know if you make any improvements.

Click here to download