Friday, March 30, 2007

Apple bootcamp 1.2 running vista

Apple recently released 1.2 beta of its bootcamp software, one of the key new feature is support for Vista. So I couldn't resist and after shuffling some files to free some space, I installed Vista on my Macbook Pro C2D. Installation was very simple, basically install Vista as per normal, then install the Mac drivers by inserting a Mac drivers CD that you create using the bootcamp assistant.

Vista reported I have a 4.7 Windows Experience Index. So far the laptop is working ok under Vista, some features such as automatic screen brightness and keyboard illumination doesn't work. One complaint is that when booted into Vista, the hardware makes a high pitch noise.

Thursday, March 15, 2007

Omea Pro Aggregator

I've spent a little bit of time looking for a RSS Aggregator and came across Omea Pro, I've settled with it for the past week and so far I like it. Its simple to use and aggregate not only feeds, but NNTP, web and mail. And the searching feature is pretty nice too.

WSS 2.0 to 3.0 In place upgrade SPConfigurationDatabaseSequence2 failed

Had worked on a few in place upgrades of WSS 2.0 sites to WSS 3.0. Haven't quite figure under what conditions this occur under but during some upgrades the wizard fail and a message like this is logged.

An exception of type Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown. Additional exception information:

Action 3.0.2.0 of Microsoft.SharePoint.Upgrade.SPConfigurationDatabaseSequence2 failed.Microsoft.SharePoint.Upgrade.SPUpgradeException:

Action 3.0.2.0 of Microsoft.SharePoint.Upgrade.SPConfigurationDatabaseSequence2 failed. --->

System.ArgumentException:
The id 0a54b6fc-79ad-4412-b51d-3091dd622976 is in
use. An Microsoft.SharePoint.Administration.SPServer named "sql" is using the same id as the new object named "sql" of type Microsoft.SharePoint.Administration.SPServer. Every object must contain a unique id. Either update the new object's id or delete the existing object and try again.


The solution that worked for me is to empty out the "Dependencies" and "Objects" table in the WSS Config database and run the wizard again.

Wednesday, August 25, 2004

PAG blocks

I've been having some trouble with a few Microsoft Application blocks lately, mainly threading issues. Haven't spent too much time on it yet, but they don't seems to be fully thread safe. Well the PAG group is taking the existing PAG blocks and developing them into the Microsoft Enterprise Library (http://www.gotdotnet.com/community/workspaces/workspace.aspx?ID=295A464A-6072-4E25-94E2-91BE63527327) I hope they've taken threading into considerations.

Wednesday, August 18, 2004

BITS C# Wrapper

I was recently using BITS (Background Intelligent Transfer Service) to create a component for uploading and downloading files asynchronously from a windows sharepoint services document library. One of the requirement was transfer can only be done by authenticated users. BITS version 1.5 and above supports this via the IBackgroundCopyJob2::SetCredentials method. However, this method uses an union in its parameter and C# does not have union. After playing with interop attributes for a while I've worked out the necessary attributes to make this work with a C# only wrapper without going to managed C++.

After looking at the definition for BG_AUTH_CREDENTIALS in the .h file from the SDK, it turns out that the union (BG_AUTH_CREDENTIALS_UNION) only contains one type which is BG_BASIC_CREDENTIALS. I was able to make the call to SetCredentials work by using the FieldOffset attribute in the struct definitions.

Here is an extract of the important struct definitions.

internal enum BG_AUTH_SCHEME
{
// Fields
BG_AUTH_SCHEME_BASIC = 1,
BG_AUTH_SCHEME_DIGEST = 2,
BG_AUTH_SCHEME_NTLM = 3,
BG_AUTH_SCHEME_NEGOTIATE = 4,
BG_AUTH_SCHEME_PASSPORT = 5
}

internal enum BG_AUTH_TARGET
{
// Fields
BG_AUTH_TARGET_SERVER = 1,
BG_AUTH_TARGET_PROXY = 2,
}

[StructLayout(LayoutKind.Explicit, Size=16, Pack=4)]
internal struct BG_AUTH_CREDENTIALS
{
[FieldOffset(0)]
public BG_AUTH_TARGET Target;

[FieldOffset(4)]
public BG_AUTH_SCHEME Scheme;

[FieldOffset(8)]
public BG_AUTH_CREDENTIALS_UNION Credentials;
}

[StructLayout(LayoutKind.Explicit, Size=8, Pack=4)]
internal struct BG_AUTH_CREDENTIALS_UNION
{
[FieldOffset(0)]
public BG_BASIC_CREDENTIALS Basic;
}

[StructLayout(LayoutKind.Explicit, Size=8, Pack=4)]
internal struct BG_BASIC_CREDENTIALS
{
[FieldOffset(0)]
[MarshalAs(UnmanagedType.LPWStr)]
public string UserName;

[FieldOffset(4)]
[MarshalAs(UnmanagedType.LPWStr)]
public string Password;
}

I've posted the interop library at http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=99f2f473-26de-41cd-bf39-8f7e75fda5aa

Monday, August 09, 2004

Start my blog

Well I think it is time to start my own blog, so here is my first entry.