Technology specialist in Windows & Web applications
_513_512.gif)
Last week I passed Exam 070-526 - Microsoft.NET Framework 2.0 - Windows-based applications.
Now I'm a Microsoft Certified Technology Specialist for .NET framework 2.0 Web and Windows applications
The blog about .NET, Sharepoint, Office
_513_512.gif)
Last week I passed Exam 070-526 - Microsoft.NET Framework 2.0 - Windows-based applications.
Now I'm a Microsoft Certified Technology Specialist for .NET framework 2.0 Web and Windows applications
Posted by Kristof De Causemaeker at 6:43 pm 0 comments
Tags: Certification
A small tip for Outlook Express users:
Few days ago I found out that Outlook does not warn us (with a suitable error message) when one of its archive maps (*.DBX file) is too big. In fact Outlook Express has an archive map per folder (inbox, outbox, sent items, ...).
For example: At the moment that 'Postvak IN.DBX' is too big (> 2Gb), Outlook Express will try to connect to the mail server, but returns a hexadecimal error which tell us that Outlook Express cannot connect to the server.
So, outlook express users, keep each folder in your OE mailbox smaller than 2 Gigs. Attention, if your inbox folder is too big, it is still possible to send mails when the 'OUTBOX.DBX' and 'Sent items' file is smaller than 2 Gigs!
No problems for Windows Vista users. In Vista you do not have Outlook Express, but Windows Mail. The new mail client stores its mails as files (*.eml) and not as database files. Don't think you can store the whole world in your mailbox, because all those mail files are stored in your windows profile folder!
Posted by Kristof De Causemaeker at 8:07 pm 0 comments
Tags: Outlook Express, Windows Mail
Microsoft has released the Microsoft Sync Framework CTP 1 few weeks ago.
With the MS Sync Framework you can easily synchronize any application, any type of data, using any protocol over any network.
The steps below explains how you to synchronize a folder. In fact, you can use the following example to create a backup of a certain folder:
//Start method
public void Backup()
{
/*1. Create or retrieve SyncId file (a Sync Id file contains a GUID to uniquely identify each folder*/
SyncId sourceSyncId = GetSyncId(Path.Combine(sourcePath, idFileName));
SyncId destinationSyncId = GetSyncId(Path.Combine(destinationPath,idFileName));
/* Adding synchronization options */
FileSyncOptions options = FileSyncOptions.ExplicitDetectChanges | FileSyncOptions.RecycleDeletes;
/* Adding synchronization filters: do not synchronize/backup the SyncId file.*/
FileSyncScopeFilter filter = new FileSyncScopeFilter();
filter.FileNameExcludes.Add(idFileName); // Exclude the generated SyncId file
/* Detect synchronization changes.*/
DetectChanges(sourceSyncId, sourcePath, filter, options);
DetectChanges(destinationSyncId, destinationPath, filter, options);
/* Synchronize (backup) source to destinationfolder*/
SyncFiles(sourceSyncId, destinationSyncId, sourcePath, destinationPath, filter, options);
}
In the Backup() method we used following supporting methods:
private void DetectChanges(SyncId syncId, string path, FileSyncScopeFilter filter, FileSyncOptions options)
{
using (FileSyncProvider provider = new FileSyncProvider(syncId, path, filter, options))
{
provider.DetectChanges();
}
}
private void SyncFiles(SyncId sourceSyncId, SyncId destinationSyncId, string sourcePath, string destinationPath, FileSyncScopeFilter filter, FileSyncOptions options)
{
using (FileSyncProvider sourceProvider = new FileSyncProvider(sourceSyncId, sourcePath, filter, options))
using (FileSyncProvider destinationProvider = new FileSyncProvider(destinationSyncId, destinationPath, filter, options))
{
//Create SyncAgent
SyncAgent agent = new SyncAgent();
agent.LocalProvider = sourceProvider;
agent.RemoteProvider = destinationProvider;
//Upload = Synchronize files from LocalProvider to RemoteProvider
agent.Direction = SyncDirection.Upload;
//Synchronize!
agent.Synchronize();
}
}
private SyncId GetSyncId(string idFilePath)
{
SyncId replicaId = null;
//Try to read existing ReplicaID
if (File.Exists(idFilePath))
{
using (StreamReader sr = File.OpenText(idFilePath))
{
string strGuid = sr.ReadLine();
if (!string.IsNullOrEmpty(strGuid))
{
replicaId = new SyncId(new Guid(strGuid));
}
}
}
//If not exist, Create ReplicaID file
if (replicaId == null)
{
using (FileStream idFile = File.Open(idFilePath, FileMode.OpenOrCreate, FileAccess.ReadWrite))
{
using (StreamWriter sw = new StreamWriter(idFile))
{
replicaId = new SyncId(Guid.NewGuid());
sw.WriteLine(replicaId.GetGuidId().ToString("D"));
}
}
}
return replicaId;
}
Resources
Posted by Kristof De Causemaeker at 7:25 pm 0 comments
Tags: Synchronization

In fact, WiX is the Open source toolset which generates Windows Installation packages or MSI files. WiX provides command line tools to build MSI packages.
Wikipedia describes the WiX toolset as follows:
The Windows Installer XML toolset (WiX), pronounced "wicks", is a free, open-source toolset that builds Windows Installer (MSI) packages from an XML document. It supports a command-line environment that developers may integrate into their build processes to build MSI and MSM setup packages. ...
The developer has to create an xml file with .Wxs extension. This file contains all files, folders, registry keys, SQL databases, IIS directories, users, shortcuts, … which must be included in the installation. Creating the .Wxs file is not that easy. Currently, there is no user-friendly application to create this file. There is already an Open Source project, called WixGUI, but they haven’t released anything yet ...




Posted by Kristof De Causemaeker at 2:38 pm 0 comments
Tags: deployment, open source projects, XML
Do you prefer an online code formatter for blogs? click here to use the Ejeliot Code Formatter
Alternative: Syntax Highlighting for Windows Live Writer
Check also the 10 tips for Windows Live Writer on this website.
Posted by Kristof De Causemaeker at 9:14 pm 0 comments
Tags: Blogs
I am currently developing a mobile application for my customer. In that application the customer wants to create and modify pictures/drawings. Those pictures must be stored in a database as binary data.
Possible solutions
There are two possible solutions:
This weekend I read a nice about SandCastle article of Maarten Balliauw.
I also want to mention that besides the SHFB project, we can also use the XpertBuildDoc add-in for Visual Studio 2005. Which is also free and is also integrated into Visual Studio 2005.
You can download the add-in here
More information
SandCastle June 2007 CTP
XPertDoc products
XPertBuildDoc forums
Francis Dion's blog
Posted by Kristof De Causemaeker at 7:34 pm 0 comments
Tags: technical documentation