Wednesday, July 13, 2011

Creating a scrollable text area using MVC.

Given below is a code snippet to create a scrollable text area using MVC.

@Html.TextAreaFor(x => x.Textfield,
new { style = "overflow-y:scroll;vertical-align:top;margin:4px 1px 4px 0;height:293px;width:600px" })

Wednesday, July 6, 2011

Compacting Microsoft Outlook PST files

If you ever notice a loooonng delay in compacting Outlook PST file, I strongly recommend running scanpst.exe on the PST file and then do a retry. ScanPST fixes certain errors in the PST file that allows the compacting process to not get blocked.

Recently I observed that compacting a 5.4 GB Outlook PST file to 2.7 GB took around 10 hrs on my Dell Latitude D630 laptop with an Intel Core 2 Duo processor!!

Monday, July 4, 2011

Fixing the error: Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

In trying to setup a site on a Windows 2008 server, I ran into the following error message

Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

Searching the forums suggested running aspnet_regiis.exe with the -i option.
Running aspnet_regiis resulted in an error, the details of which could be found in a log file it generates. The log file had the following message

Failure Changing IIS ApplicationHost.config: IIS7Register failed with HRESULT 800700b7: 'Cannot create a file when that file already exists

I was able to fix the above error following the steps outlined in this blog article. The article recommends replacing %windir% with the absolute path "C:\Windows" in isapiCgiRestriction section of \windows\system32\inetsrv\config\applicationHost.config for .NET 4.0. The replacement is not required for .NET 2.0. Strange, but it worked. Running aspnet_regiis.exe after making this change resulted in successful execution and also fixed the "bad module" error!!

What is success?

The journey of life takes us through varied experiences like landing an admission at a prestigious college, earning a degree, getting hired,...