Wednesday, October 03, 2007

Sharepoint authentication prompt in Vista RTM

If you try to open a document from a document library from MOSS or Windows Sharepoint Services, you get prompted for authentication even you've setup all your kerberos authentications and correct zones for IE. And you're pulling hair out of your head. It turns out that this is caused by issue in Vista and the WebDav component.

When you open a a document in Office 2007 stored in Sharepoint, the office programs use the OS WebDav component to communicate to the Sharepoint server. However to successfully pass your current Windows authentication through to the server, it is very sensitive to what proxy and zone settings you have setup in IE for the user. The best way to to mandate these IE settings via group policy or your favourite management tool for your users.

Until a SP1 of Vista is available (If it is fixed), your workaround is to specify a proxy settings in IE and select "bypass proxy server for local addresses".

If you use IE and choose to configure your client using automatic configuration script, instead of checking the "Automatically detect settings", you may need to apply this hotfix http://support.microsoft.com/kb/941853/.

Updated: 3/1/2008, Well with vista SP1 RC, it is no longer prompting me.

Thursday, September 27, 2007

Limitation on TFS 2008 and shared WSS farm

A new feature in TFS 2008 (Orca) is the ability to easily point TFS to use an existing Sharepoint farm. For example, if you've got an existing sharepoint deployment for your project team, you can configure TFS 2008 to use that same farm instead of setting up and maintaining another farm just for TFS. Check out this blog post by Sudhir Hasbe http://blogs.msdn.com/sudhir/archive/2007/06/25/sharing-your-corporate-sharepoint-server-with-multiple-tfs-servers.aspx

Its all good except when I tried it with TFS 2008 Beta 2, you seem to have some restrictions in your selection of path. It only works correctly when your path is a single level deep. Ie, http://wssserver/TFSSites, if you try to point it to http://wssserver/development/TFSSites, some functionalities works, but a lot of things don't.

Sent a feedback to MS and apparently is by design. So from my tests, it seems that you can have WSS on a corporate farm, but as long as that path is onlye 1 level deep.

Monday, July 23, 2007

MSDE Backup on x64 Windows 2003 Server

While testings backup on a x64 Win2003 Server today, I keep getting strange errors from NTBackup and EventLog.

Event Type: Error
Event Source: VSS
Event Category: None
Event ID: 6013
Date: 23/07/2007
Time: 4:06:59 PM
User: N/A
Computer:
Description:
Sqllib error: OLEDB Error encountered calling IDBInitialize::Initialize. hr = 0x80004005.
SQLSTATE: 08001,
Native Error: 17
Error state: 1,
Severity: 16
Source: Microsoft OLE DB Provider for SQL ServerError message: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Well as it turns out the application I was testing had a dependency on MSDE and I just had to install the patch to MSDE http://support.microsoft.com/kb/913100 for x64 machines only.

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.