Home | Blog | Publications | Photos | Services | About | Contact

Blog Archive - May, 2005

Back to Blog index.

Tue, 31 May 2005 14:27:45 GMT:
Jason Vokes finally online :-)

Jason Vokes, the Borland European Product Line Manager for Delphi/C++ has finally opened his own blog. :-)

It's available from the Borland Blog site at blogs.borland.com. Welcome online, Jason, and CU!

PS. I need to get my hands on that Delphi .NET Compact Framework preview compiler!

Sun, 29 May 2005 08:13:39 GMT:
How to get IIS 6.0 and ASP.NET modify an Access database

Configuring an ASP.NET application on IIS 6.0 (Windows Server 2003) can be tricky, especially if your application needs to use a database, say an Access database. Reading the database works by default, but modifying it does not. So, what to do?

By default on Windows Server 2003, ASP.NET uses the IIS 6.0’s working process settings, i.e. it is running in the "Worker Process Isolation Mode." This means that you don't need to specify security settings in the XML based Machine.config file, instead you just change the settings for the application pool visually in the IIS Manager console. See the topic "Access Permissions for Web Applications" in the .NET SDK documentation for details.

Okay, now you know the very basics. Next assume you have an ASP.NET application that needs to access an Access database. By default, all is fine, since you can read the contents of the database. But when modifying it, you might run into errors such as "Operation must use an updateable query".

To get things working, you need to add some more NTFS permissions to your database file, or more specifically the directory where the .MDB file exists. This is because your ASP.NET application will also need to be able to generate (write) the lock file (.LDB).

By default, an application pool in IIS 6.0 runs under the NETWORK SERVICE low-privileged system account. You can verify this from the Identity tab of the application pool, or through the Windows Task Manager by looking at the user name of the W3WP.EXE file, the process name for an application pool.

So, to get rid of the security problems you have, open Windows Explorer, and open the properties for the directory where your database exists, and add the NETWORK SERVICE account to the list. Be sure to give it the Modify permissions, that is Read and Write rights.

This should fix the error. You can also use the following piece of ASP.NET C# code to verify the user account under which your web application is running:

<HTML>
<HEAD>
<TITLE>Test Page</TITLE>
</HEAD>
<BODY>
<H1>Test Page</H1>
<P>User is: <%= System.Security.Principal.WindowsIdentity.GetCurrent().Name %>.</P>
</BODY>
</HTML>

By default, this should display: NT AUTHORITY\NETWORK SERVICE.

Finally, you might wish to download the tool named "Internet Information Services Authentication and Access Control Diagnostics Version 1.0" (Authdiag) from Microsoft's web site. This tool might help you get your access permissions right.

Wed, 25 May 2005 15:45:08 GMT:
Delphi 2005 version numbers

Delphi 2005 Update Pack 3 is now here, and installing it is recommended especially performance-wise.

For your reference, I'm documenting the version numbers of Delphi 2005 (Architect edition) here:

Tue, 24 May 2005 05:56:48 GMT:
Hyper-threading tips

The latest incarnations of the Pentium 4 processor have support for hyper-threading.

Taking advantage of these new features is quite easy if you know what to do. The latest MSDN Magazine has an article about this.

It applies to both unmanaged (Win32) and managed (.NET) code. Examples are in C#.

Thu, 19 May 2005 12:24:57 GMT:
New, fresh summer style on my web pages

Summer is soon here after a loooong winter, but it's worth it. To celebrate, I took some photos today, and updated my darker, autumn-like photos on my web pages.

Enjoy!

Sun, 15 May 2005 07:42:08 GMT:
How to backup to a file in Windows XP

A backup utility has been part of Windows NT at least since version 4.0, and so this utility is also part of Windows XP.

Now, I don't have a tape drive, so I'm most often backing up my data to a file on disk, and then copying it to DVD-RW disc, or whatever depending on the backup size.

With my new PC, I tried to schedule ntbackup.exe with a custom backup selection file (.bks). However, not matter what I tried, Backup only took a backup of some default files on the C: drive, and this resulted in a tiny 10k backup file. Not much.

I tried many different alternatives, but finally I found out the reason why my selection file was not used: I didn't put an "at" sign before the filename! This wasn't documented anywhere, and I only found out by looking at some examples of backing up with Windows 2000 Advanced Server...

So, if you wish to backup to a file with the ntbackup.exe utility in Windows XP, use a command line like this:

ntbackup backup "@C:\Backup\My Documents.bks"
/f "C:\Backup\My Documents.bkf" 
/v:no /l:s /m normal /snap:on

That should work okay.

Sun, 15 May 2005 05:07:52 GMT:
Two new articles published

Two magazines have my latest articles published, and this time one of them is also available on-line for free.

The free article is titled "Diagnosing and Debugging with the System.Diagnostics Namespace" and it appeared in the May 2005 issue of the Visual Studio .NET Developer magazine from Pinnacle Publishing.

My other article appeared in the Finnish Tietokone magazine with the title "Selaimen huudot esiin".

Tue, 10 May 2005 15:33:03 GMT:
Impressive Beta 2

Visual Studio .NET 2005 Beta 2 is now running as I write, and I must say Microsoft has done an excellent job with the product. I just cannot stop wondering how Borland can compete.

Some basic editing features I really like include:

Naturally, there are tons of other cool features, but regarding general development experience, these I noticed first.

Sat, 07 May 2005 17:18:16 GMT:
New computer

My new computer arrived on Friday, and so far I've got the basic setup done. It's great to have a faster PC, my old one was pretty sluggish...

Otherwise the PC is a standard one (though with 2GB RAM), but the motherboard has rather geeky feature: there's a two digit LED display that shows the POST state during system bootup. So if the POST fails, you get to see why. :-)

Tue, 03 May 2005 16:45:12 GMT:
MSDN Universal arrives

UPS delivered a packet to me today, and it contained the initial MSDN Universal shipment on DVD along with my Subscription Card.

It's XMas time again. :-)

 

› Blog Archive