Friday, September 9, 2005

Syntax error in Update command

This .net error is a pain, but so simple when you know how!

I was using oledb to update access (I know it shouldn't ever be used as a web database!)

However when running the query

'update users set password = 'value' where userid = 1'

.NET through up Syntax error in Update command, yet the query works in access

However password is a reserved word, so to get the query working using .NET change it to:

'update users set [password] = 'value' where userid = 1'

A full list of reserved words can be found here

Thursday, September 8, 2005

Re-Installing Outlook Web Access

Hi,

I recently had a client who could not get Outlook Web Access working, as someone had changed some IIS settings. To reinstall web access, do the following:

1. Back up your IIS Metabase. To do this, follow these steps: a. Start IIS Manager. b. Right-click "Default Web Site", point to "All Tasks", and then click "Save Configuration to a File".

2. Delete the virtual directories for Outlook Web Access. To do this, right-click "Exadmin" in the left pane of IIS Manager, and then click "Delete". Click "Yes" when you are prompted with the question of whether you want to delete this item. Repeat this step for the following virtual directories:
  • Exchange
  • ExchWeb
  • Microsoft-Server-ActiveSync *only for 2003
  • OMA * only for 2003
  • Public

3. Quit IIS Manager.

4. Click "Start", click "Run", type "cmd" (without the quotation marks), and then press ENTER.

5. Change to the following folder. In this example, is the hard disk drive where Windows is installed: :\inetpub\adminscripts

6. Type "adsutil" (without the quotation marks), and then press ENTER. Important By default, CScript is not the default scripting host for Windows Server 2003. To run the adsutil command, CScript must be configured as the default scripting host. To do this, click "Yes" if you are prompted to register CScript as you default host for VBscript, and then click "OK". Note If you receive a list of adsutil command options, CScript is already configured as the default scripting host for VBscript.

7. Type "adsutil delete ds2mb" (without the quotation marks), and then press ENTER. Note To set the default scripting host to WScript, type "WScript //H:WScript" (without the quotation marks) at the command prompt, press ENTER, and then click "OK".

8. Click "Start", point to "All Programs", point to "Administrative Tools", and then click "Services".

9. Right-click "Microsoft Exchange System Attendant", and then click "Restart". Click "Yes" if you are prompted with the question of whether you want to the restart other services. The Microsoft Exchange Information Store service will probably be listed as one of the services that restarts.

Monday, September 5, 2005

Event Id 1054, Event Id 15 problems part 3!!

OK,

despite my earlier posts on this subject:

Event Id 1054 and 15

Userenv Tool

Gigabit Networks and Event Id 15


I have still had some clients with errors of Event Id 1054 and Event Id 15. I'm getting Deja vu here, but I have actually found the solution!

To fix the errors you need to turn off the autoenrollment of Certificates in Active Directory. To do this, you must edit your domain group policy (you should have created one..never use the default one; if you don't have one, then create a new one.)

You want to edit the following entries:

1) Computer Configuration > Windows Settings > Security Settings > Public Key Policies > Autoenrollment Settings

2) User Configuration > Windows Settings > Security Settings > Public Key Policies > Autoenrollment Settings

For both entires, double click on autoenrollment settings and click 'Do not enroll certificates automatically'

If this doesn't fix the problem and the earlier posts don't, then please let me know!