Thursday, November 27, 2008

Zend Framework with IIS 7.0

Zend Framework uses Fron Controller pattern to redirect incoming request. On Apache web server, mod_rewrite can be used to redirect the request. What I am interested is how to support url rewrite in IIS 7.0.

Google search revealed there is a URL Rewrite module for IIS 7.0.

Wednesday, August 6, 2008

SQL Server 2008 RTM is available at MSDN

 

MSDN subscribers can get the RTM.

Friday, July 18, 2008

DBCC LOG

There is an undocumented command for checking SQL Server transaction log file for 7.0 and 2000.

To use it: DBCC log(dbname|dbid, [type=-1|0|1|2|3|4])

The meaning of type is

-1: 4 + hex dump of low row info, checkpoint begin, DB version, and Max XDESID

from 0 to 4, more information about the transaction is retrieved. Default value is 0.

Thursday, July 17, 2008

How to extract msi content?

 

From windows command line tool, msi content can be extracted using msiexec command.

With C:\>msiexec, a windows installer window will come up showing the syntax of msiexec. To actually extract the content,

msiexec /a msifile /qb TARGETDIR=outfolder

SQL Injection

Microsoft published a security advisory (954462) on June 24, 2008 warning about the rising occurrence SQL Injection attack. "These SQL injection attacks do not exploit a specific software vulnerability, but instead target Web sites that do not follow secure coding practices for accessing and manipulating data stored in a relational database."

This morning, I find out that one of our databases was subjected to this issue, which causing the web site failed to launch. We have to restore the data from backup.

One useful tool, (also suggested in the security advisory) is HP Scrawl, which help web site administrators to detect SQL Injection vulnerabilities.

image

Friday, June 20, 2008

Open Command Window in explorer

Microsoft powertoys provide a useful tool to open a command prompt windows. But on Windows Vista and Windows Server 2008, this useful feature is somewhat a hidden feature.

On the right panel of Windows Explorer, hold SHIFT key when you right click on a folder, the "Open Command Window Here" will show as an item in the context menu. While this work, it is not convenient, and the folder has to be on the right panel.

Modifying registry can be used to achieve the same behavior as powertoys:

1. Go to HKEY_LOCAL_MACHINE/Software/Classes/Folder/Shell

2. Create a key with the name you want.

3. Create a "command" subkey and set the default value to "cmd.exe /k pushd %1".

All done!

Windows Live Writer on Windows Server 2008

Recently I updated my server to Windows Server 2008 and would like to use Windows Live Writer for blog editing. Unfortunately, the Windows Live Writer (Version 2008) installer does not work under this new environment. I was about to give up on it, then I find that www.live-writer.de provide a msi version. Installation went smoothly!