Simon Fell > Its just code > October 2003

Thursday, October 30, 2003

Peter is back blogging from the PDC. :)

Thursday, October 30, 2003


A little too close to the truth!

Wednesday, October 22, 2003

I have no idea how or what, but something seems messed up on my AD setup, i get this in my event log every time my XP box tries to authenticate to a Win2003 server (both in the domain, the DC running Win2000). Suggestions welcome!

The kerberos client received a KRB_AP_ERR_MODIFIED error from the server host/devon.simonathome.com. This indicates that the password used to encrypt the kerberos service ticket is different than that on the target server. Commonly, this is due to identically named machine accounts in the target realm (SIMONATHOME.COM), and the client realm. Please contact your system administrator.

Wednesday, October 22, 2003

I started looking at CodeSmith, as an old time Gen<X> user I felt right at home, if you're interested in template based code generation, check it out. Update, 2 hours after i finished installing it i already had templates to gnerate stored procedures and data access layer code all to the conventions and paterns that i'm using. Great job Eric!

Wednesday, October 22, 2003

More and more services seem to be using derived complex types (like below) to get type hierarchies in their language of choice, works great for those languages that it maps cleanly to (like c# and java), but its painful but possible in VB6. Ran into one VB6 bug (no chance of seeing a fix for it) where interface methods can't have _ in the name, the compiler fails to see the implementation in the implementing class. As far as I can see from the docs _ is valid in a method name, oh well, one more wrinkle in the xsd -> vb name mapping process.

	<complexType name="Entity">
		<sequence>
			<element name="Id" type="xs:string"/>
			<element name="LastModified" type="xs:dateTime"/>
			<element name="LastModifiedBy" type="xs:string"/>
		</sequence>
	</complexType>
	<complexType name="Contact">
		<complexContent>
			<extension base="tns:Entity">
				<sequence>
					<element name="ContactPerson" type="xs:string"/>
					<element name="ContactPhone"  type="xs:string"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<complexType name="Customer">
		<complexContent>
			<extension base="tns:Contact">
				<sequence>
					<element name="Since" type="dateTime"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>

Tuesday, October 21, 2003

What is sa.windows.com and why is my XP box talking to it?, was using YATT to check and couple of things and noticed a number of requests going to sa.windows.com. I think its something to do with the search tool in windows explorer.

GET /sasearch/lclsrch.xml HTTP/1.1
If-Modified-Since: Fri, 30 Aug 2002 03:41:31 GMT
User-Agent: SCAgent
Host: sa.windows.com

HTTP/1.1 304 Not Modified
Server: Microsoft-IIS/5.0
Date: Wed, 22 Oct 2003 00:35:51 GMT
P3P: Custom Header Value: policyref="<http://sa.windows.com/privacy/>", CP="NOI DSP NID COR CUR ADMa DEV OUR SAM BUS STA"
ETag: "43be26e61d4c11:7fe"
Content-Length: 0

GET /sasearch/lclAdv.xml HTTP/1.1
If-Modified-Since: Fri, 30 Aug 2002 03:41:32 GMT
User-Agent: SCAgent
Host: sa.windows.com

HTTP/1.1 304 Not Modified
Server: Microsoft-IIS/5.0
Date: Wed, 22 Oct 2003 00:35:51 GMT
P3P: Custom Header Value: policyref="<http://sa.windows.com/privacy/>", CP="NOI DSP NID COR CUR ADMa DEV OUR SAM BUS STA"
ETag: "6850c1829cac11:7fe"
Content-Length: 0

GET /sasearch/balloon.xsl HTTP/1.1
If-Modified-Since: Fri, 30 Aug 2002 03:41:32 GMT
User-Agent: SCAgent
Host: sa.windows.com

HTTP/1.1 304 Not Modified
Server: Microsoft-IIS/5.0
Date: Wed, 22 Oct 2003 00:35:51 GMT
P3P: Custom Header Value: policyref="<http://sa.windows.com/privacy/>", CP="NOI DSP NID COR CUR ADMa DEV OUR SAM BUS STA"
ETag: "6fb3f46c61d4c11:7fe"
Content-Length: 0

GET /sasearch/lclprog.xml HTTP/1.1
If-Modified-Since: Fri, 30 Aug 2002 03:41:38 GMT
User-Agent: SCAgent
Host: sa.windows.com

HTTP/1.1 304 Not Modified
Server: Microsoft-IIS/5.0
Date: Wed, 22 Oct 2003 00:35:51 GMT
P3P: Custom Header Value: policyref="<http://sa.windows.com/privacy/>", CP="NOI DSP NID COR CUR ADMa DEV OUR SAM BUS STA"
ETag: "6fb3f46c61d4c11:7fe"
Content-Length: 0

GET /sasearch/lclprog.xml HTTP/1.1
If-Modified-Since: Fri, 30 Aug 2002 03:41:38 GMT
User-Agent: SCAgent
Host: sa.windows.com

HTTP/1.1 304 Not Modified
Server: Microsoft-IIS/5.0
Date: Wed, 22 Oct 2003 00:35:54 GMT
P3P: Custom Header Value: policyref="<http://sa.windows.com/privacy/>", CP="NOI DSP NID COR CUR ADMa DEV OUR SAM BUS STA"
ETag: "e0372a839cac11:7fe"
Content-Length: 0

GET /sasearch/lclrfine.xml HTTP/1.1
If-Modified-Since: Fri, 30 Aug 2002 03:42:36 GMT
User-Agent: SCAgent
Host: sa.windows.com

HTTP/1.1 304 Not Modified
Server: Microsoft-IIS/5.0
Date: Wed, 22 Oct 2003 00:41:56 GMT
P3P: Custom Header Value: policyref="<http://sa.windows.com/privacy/>", CP="NOI DSP NID COR CUR ADMa DEV OUR SAM BUS STA"
ETag: "56e83a839cac11:7fe"
Content-Length: 0

Saturday, October 18, 2003

  • Strep throat sucks, not satisfied with putting me completely out of action for a week, its come back for another go. :(
  • The only consolation is that it didn't really kick in hard until after the Chili Pepper's gig at Oakland Arena last night, which was fantastic.

Thursday, October 16, 2003

wOOt!, the Windows version of iTunes is out. I've been pretty disappointed with both WMP9 and Winamp3, so i hope this will save me!.

Monday, October 13, 2003

To expand on my earlier comments on Chris's book about the Applications and Settings chapter here are the issues I spotted (BTW, don't let this put you off buying the book, its a good book, I'd still recommend it)

Single Instance Apps via a named Mutex

Chris outlines a solution using a named Mutex to detect multiple instances of an application trying to start, and points out that there can be issues when running under terminal services, however the particular problem that Chris outlines (same user with multiple Terminal Server sessions going) doesn't exist, because the mutex names are bound to different scopes, as described in detail in the Platform SDK docs for CreateMutex (and equally completely missing from the .NET docs for the Mutex class), you can prove this to yourself with a simple demo.

using System ;
using System.Threading ;

public class MutexName
{
        public static void Main(string [] args)
        {
                bool firstInstance = false ;
                Mutex m = new Mutex(true, "SimonsTestMutex", out firstInstance ) ;              
                
                Console.WriteLine("Mutex created, firstInstance={0}, press any key", firstInstance ) ;
                
                Console.Read() ;
        }
}

Run an instance on the console and using the same account another instance from a TS session, now grab ProcessExplorer and fire it up from one of the sessions, you'll notice that the actual name of the console instance mutex is \BaseNamedObjects\SimonsTestMutex but the name of the TS instance is \Sessions\1\BaseNamedObjects\SimonsTestMutex. The TS folks have done the heavy lifting for you.

Passing Command Line Parameters

The chapter goes on to discuss how to pass parameters from the 2nd start attempt to the already running attempt, and outlines a solution based on remoting. There are 2 issues with this, one it uses a localhost:1313 address, of which there is one per box, no good in the face of TS and second there's a potential security issue in the TS case as it's passing the parameters I tried to start the app with to potentially a different user account. I'm not sure how to fix this, you need something that can take advantage of the scoping done for kernel objects, perhaps a named pipe channel would pick up those scopes?? (anyone know)

My final issue was later in the chapter it talks about storing data as serialized instances using the serialization framework, and there's also talks about versioning, but no mention of the potential issues with migrating the serialized data between versions. I did subsequently noticed that there's an appendix on that very topic, so make sure you check that out as well.

Monday, October 13, 2003

Sunday, October 12, 2003

  • The Italian Job is now available on DVD, no not the cheesy remake, the original 1969 Michael Caine, Noel Coward classic, one of my all time favorite movies.
  • Dare has his new blog up and running using dasBlog.
  • As Russell points out its fleet week, trying to cycle through the wharf and marina this morning was painful, lots of people out, I picked a different route back.
  • Amon Tobin played an awesome gig at Bimbo's a few weeks back, and Kid Koala is coming up, and for something slightly different for me, saw ZooStation, a U2 cover bad at the last day saloon last night.

Friday, October 3, 2003

Haven't posted much recently, mainly because I've been busy, then I've been sick, now I'm back to been busy, here's a few bit'n'peices

  • Sam thinks WS aren't in use, this I heartily disagree with, Web Services are getting deployed for both intra and inter company integrations and systems, what doesn't appear to be happening is the consumer focused web services (ala Hailstorm), I remember someone saying that this is because of security issues, which I don't buy, I think its more of a business model problem more than anything else.
  • Reading, I've been reading Chris Sell's Windows Forms Programming in C#, overall I've been impressed, it has a bunch of useful info in there, all in Chris's easy to read style I did however think that the chapter on Applications and Settings was a bit weak, in particular at the start of the chapter he outlines a bunch of problems, but as the solution evolves throughout the chapter I don't see it solving the problem. I've also been reading Programming the Microsoft Windows Driver Model which seems pretty good, only time will tell though in this case.
  • Continuing to make progress on PocketSOAP 2.0, the SOAP 1.2 support is almost complete (its in CVS if you want to try it).
  • I've also been working on the WSDL generator, fixed a couple of bugs, supported a few more XSD constructs, hopefully there will be a new release available soon.
  • I'm sick and tired of hearing about longhorn, particularly of the "it rocks but I can't tell you" variety, and Scobble's incessantly going on about it has actually backfired and reduced my interest in going to the PDC. All you ever seem to hear out of the MS machine is what magical thing is coming in 2-3 years time that's going to save the world, and nothing about the problems I'm trying to solve today.