Tuesday, June 30, 2009

Part of Appspot Down

Last night, for the first time ever, my web site on was down. The URL was returning Error 500 - Server Error. The other web site on the same domain was up and running.
This is the first time I see a part of Google faulty. I thought something might have happened with my application so I tried to upload the site again but was unable to.
Anyway, everything is up and running again this morning. This is a small dent in Google's (so far) 100% reliability and uptime. :)
I have to say I'm greatly thankful to them for providing this service and performance for free. They're really making the web a better place.

Sunday, June 28, 2009

CSS Shadow

The page below contains many CSS samples. A very nice CSS-only shadow is simple and effective solution if you need a quick shadow on a div element.

Stu Nicholls | CSSplay | CSS simple fluid drop shadows

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

I just had the following error while trying to run an ASP.Net application under IIS:

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.

The situation is - I'm setting up an application to run on my local machine. Running it with a development web server was OK at first but then I needed to use my browser from another computer. This prompted me to set up the application under local IIS instead of the development web server, which accepts only local connections. Trying to set up a tunnel with an SSH server did not work.
So, to set up an application under IIS first I had to give access permissions to Network Service user to access the folder used as the root.
The second thing, that actually caused the error above, was to set up the login for Network Service in the SQL Server. No additional settings necessary at this point.
And only these two settings set up the web site for access from other computers.

Friday, June 26, 2009

Browser Shots

A really useful site that provides images of how sites render in different browsers.
Enter the URL and let the site renders the page in the selected web browsers.

Check Browser Compatibility, Cross Platform Browser Test - Browsershots

Thursday, June 25, 2009

Image Cropping with jCrop and ASP.Net

Great example on how to bind together image upload and cropping with jQuery, JCrop, and ASP.Net. Also some references and tips, like where to get IntelliSense for JavaScript files in Visual Studio 2008, link to jQuery on GoogleAPIs for better caching, etc.

Upload and Crop Images with jQuery, JCrop and ASP.NET

JavaScript Debugger for Visual Studio 2008

Intellisense for JavaScript files is available for Visual Studio 2008 SP1 through a hotfix available at the link below. This is extremely useful for debugging jQuery (and other, of course) JavaScript libraries.

Visual Web Developer Team Blog : VS2008 SP1 Hotfix to Support "-vsdoc.js" IntelliSense Doc Files

Tuesday, June 23, 2009

Focus-Follows-Mouse in Windows

There is a very simple change in Windows to enable natively-supported functionality of focus-follows-mouse. This is similar to default functionality in most desktop managers in Linux (or X-Window system).


Believe it or not, Windows does support focus-follows-mouse, though there is no GUI configuration exposing it. Instead you must edit a registry key and then log out and back in for the change to become effective. You can use regedit to edit the key.

On Windows NT, set the following registry key to have a value of 1:
HKEY_CURRENT_USER\Control Panel\Mouse\Active Windows
On NT it has some bugs: some apps auto-raise on focus, and alt-tab doesn't move the mouse.

On Windows 2000, XP, or 2003, you need to change a binary-valued registry key:
This is a little-endian bitmask. For focus-follows-mouse, add the flag 0x1. For example, my XP SP2 laptop originally had a value of 9E 3E 05 80, which is 0x80053E9E. To activate focus-follows-mouse I changed to 0x80053E9F, or 9F 3E 05 80 in regedit.

According to you can also achieve raise-on-focus by adding the flag 0x40. I haven't tested that as I don't like raise-on-focus."
Source: Making Windows Usable
So, it is the first number that gets increased by 1 in regedit.

Monday, June 22, 2009

S.M.A.R.T. Software from WD

Here is the download page for S.M.A.R.T. software from Western Digital. It reads other drives that support S.M.A.R.T. so the manufacturer is not the crucial point with these diagnostics.

WD Support > Downloads > SATA Hard Drives > WD Caviar Blue / SE / SE16 (SATA II)

Another tool for WD Elements hard drive is the Spindown or Stop Utility.
WD Support > Downloads > WD Elements > WD Elements Portable

Sunday, June 21, 2009

More Firefox Goodies

To enhance Firefox further, I went on to install...
  • Hide Menubar addon - hides the default menubar. Shortcut "Alt" displays teh menu bar temporarily if/when you need it. This gains some space at the top of the window.
  • Nightly Tester Tools - allows forced installation of addons that were not updated for version numbers. Risky but well worth it for some extensions.
  • Omnibar - enhances address/location bar functionality. "Alt+D" is the shortcut to move cursor to location bar. Now I use this instead of Ctrl+K for the search box. Ctrl+Up or Down changes the default search provider.
  • Hide Caption - another addon that provides screen real-estate. This one hides the title bar / caption. Minimize, Maximize, and Close buttons move to the next visible toolbar.
Keyboard shortcuts

Chrome & Firefox 3.5 Memory Usage

In a very interesting experiment, Sam Allen tests the memory usage of today's leading edge browsers (except for IE8). As you can see below, the numbers are appalling and the graph says it all.


Chrome and Firefox 3.5 Memory Usage

Firefox Preloader

With the help of this application, Firefox performance matches that of Google Chrome on my laptop. Preloader takes care of loading the Mozilla engine into memory so that, when I start Firefox through SlickRun, it appears almost instantaneously.
I have earlier installed Firefox 3.5, which is much faster than the previous version in executing JavaScript. Now, this is Chrome on steroids. :) I really miss my Firefox addons when I use Chrome and now that is taken care of by making Firefox much faster. Terrific!

So, in summary, this is what I did today... Installed Fasterfox Lite addon; installed Firefox Preloader, installed Firefox 3.5 RC2. Firefox Preloader

Google's JavaScript Benchmarks

Google Chrome JavaScript execution is currently the fastest. Below is the link to the benchmark suite where you can test your browser.
I currently get 1578 with Chrome and only 130 with Firefox 3.0.11. Firefox 3.5 RC2 scores 212.
Detailed comparison below:
Google Chrome Mozilla Firefox 3.0.11 Firefox 3.5
Richards: 1471
DeltaBlue: 1297
Crypto: 1555
RayTrace: 1841
EarleyBoyer: 2333
RegExp: 554
Splay: 3452
Richards: 111
DeltaBlue: 130
Crypto: 62.5
RayTrace: 131
EarleyBoyer: 165
RegExp: 92.3
Splay: 352

Richards: 750
DeltaBlue: 52.6
Crypto: 340
RayTrace: 154
EarleyBoyer: 186
RegExp: 132
Splay: 378

Link to the tests:
V8 Benchmark Suite
Edit: Fortunately, this week there was an announcement (what a coincidence) that Mozilla will introduce new JavaScript Just-in-Time compiler with codename TraceMonkey, to replace their current SpiderMonkey engine, that should increase JavaScript performance in Firefox 3.1 anywhere from 2 to 37 times over the previous version of the browser (3.0). Average performance improvement is calculated to be 4.6 which is on par with, if not faster than, current Google Chrome.

I have installed Firefox 3.5 RC2 and the subjective feeling of speed is greatly enhanced compared to Firefox 3.0. To turn the TraceMonkey on, read this article.

For more good news about the next generation Web, read this post.

Update 2009-07-21: Changed the Benchmark Suite link to point to the current suite version.

Visual Color Picker & Pixel Measurer

A couple of tools designers can't live without. Not only these are freeware but they are implemented so thoroughly, not leaving anything to desire.
Visual Color Picker has more options than I ever needed. It is nice to have all the options ready should the need arise.

NOVOSIB Software Co. LinxExplorer, LinxMonitor, Visual Color Picker

Best 50 Firefox add-ons for Web developers

Here is a list with 50 add-ons for Firefox, particularly useful if you're a web developer. I'm not using all of these add-ons at the moment but they might come in handy sometimes, so here's the link:

The Best 50 Firefox add-ons for Web-developers! | 1stwebdesigner - Love In Design

FlashGet - Best Download Manager

I'm back to using FlashGet as my download manager of choice. This was my download manager years ago but I stopped using it after I found Free Download Manager. However, one thing I got used to with FlashGet was that the program closed itself once the downloads were completed. This was something I took for granted and could never understand why other download managers did not have that feature.
Now that FlashGet is freeware I'm using it again. There are other great features added, like using BitTorrent and eDonkey (KAD) networks for download, which I find to be an excellent feature for a download manager, although I have no idea how usable these features are when put together.

Best Download Manager - FlashGet

Fasterfox Lite - Speed up your Firefox browsing

Fasterfox Lite is a Firefox browser addon that significantly reduces page loading and rendering time. From my experience, the net effect is now quite comparable to Chrome, if not better.
Lite, in this case, means this is version of Fasterfox that does not use page pre-fetching. I prefer not to load all the links on a page, whether it is done in the background or not.
All I need now is find which addons cause Firefox to take ages to start up...

Fasterfox Lite :: Add-ons for Firefox

Saturday, June 20, 2009

GeckoFX Forum / GeckoFX Discussion

Mozilla Gecko (Firefox) rendering engine is available as a component for .Net. Should you want to render HTML with an engine other than Internet Explorer, use GeckoFX replacement for WebBrowser control.

GeckoFX Forum / GeckoFX Discussion

Prince: What's New

One more option for HTML –> PDF conversion. They offer a free Personal license for interactive use on a single computer. Support for XHTML and CSS. The output formatting makes phenomenal documents. Samples can be seen on the Samples page.

Will give it a try.

Prince: What's New

Friday, June 19, 2009

Drop Shadow Examples

Drop Shadow effect with jQuery. The effects are awesome. This might reduce load on images in web sites.

Drop Shadow Examples

Thursday, June 18, 2009

Charts using jQuery and Canvas

It is really amazing what can be produced with only HTML, CSS, and JavaScript now. Here is the demo on how to draw different types of charts using HTML canvas and jQuery.

fgCharting library can be downloaded from the same page. Canvas is not supported by Internet Explorer, though, but there is a workaround. Google devs have created a JavaScript library that sorts that out.


The above page demonstrates the concept and there must be quite a few good libraries available out there by now. One good example is Flot (link).

jquery-in-place-editor - Google Code

jQuery In Place Editor is a plugin for jQuery that makes text on the web page editable in a way similar to the way Flickr does. The editable text is highlighted on mouseover. Clicking the text turns it into a text box or text area for text input. Clicking outside the input text box submits (POST) the changed text to the preset URL.

There are other controls with similar and extended functionality but I like the way this one actually does things in a way very similar to Flickr.

jquery-in-place-editor - Google Code

Wednesday, June 17, 2009 NFop

Another approach in creating PDF documents in code is the XSL transformation with Formatting Objects Processor (FOP). NFop is .Net port of Java FOP library.

FOP (Formatting Objects Processor) is a tool for formatting of impression controlled by XSL. It is an application which reads a tree of objects of formatting and which generates the resulting pages in a given format. For the moment the formats of returned according to are supported: Pdf, PCL, PS, SVG, XML, Print, AWT, MIF and TXT. pdf being the format of predilection.

Some documentation available (link). Sample on Code Project (link). Additional documentation on Apache FOP site (link) NFop

Tuesday, June 16, 2009

Cassini 2

Cassini 2 source code is available at Dmitryr’s blog. Although WebDev.WebServer.exe originates from Cassini code, they are not completely identical. Should you need a small (development) web server that does not require the whole Visual Studio installation, use the original Cassini instead of WebDev.WebServer. It runs aspx code and code-behind and is, therefore, very useful for small demo sites and ad-hoc development.

dmitryr’s blog: Cassini Version 2

My compiled binary version available here.

Monday, June 15, 2009


WebDev.WebServer.exe, with .Net Framework 3.5, is located in “%ProgramFiles%\Common Files\microsoft shared\DevServer\9.0\”.

It is a handy small web server that executes .Net code. Combine jQuery UI with server-side support provided by WebServer and back-end code in .Net. Could this replace desktop applications soon?

To run the web server from a batch file, using the folder where the batch file resides as a root, put the following line in the batch file:

"%programfiles%\Common Files\microsoft shared\DevServer\9.0\WebDev.WebServer.exe" /path:"%cd%"

To create a context menu for a folder that runs the web server in the selected folder, do the steps below. Alternatively, you can copy the following lines into a .reg file and run it:

Windows Registry Editor Version 5.00

@="Start Web Server here"

@="\"c:\\program files\\Common Files\\microsoft shared\\DevServer\\9.0\\WebDev.WebServer.exe\" /path:\"%L\""

Eventually change the path to %ProgramFiles%. The steps to do this manually are below:

  1. Open Registry Editor (regedit) and go to HKEY_CLASSES_ROOT\Directory\shell,
  2. Create a new Key and give it a meaningful name (WebServer, for example),
  3. Edit the (default) value and enter the description (i.e. "Start Web Server here"),
  4. Add the new sub-key called "command",
  5. Set the (default) value to
    "c:\program files\Common Files\microsoft shared\DevServer\9.0\WebDev.WebServer.exe" /path:"%L"
The results will be visible immediately. Simply right-click any folder and your entry will be there. Clicking it will run the web server in the selected folder. [Check this article for registry locations for context menu handlers.]
Edit the parameters (/port, /path, /vpath) additionally to suit your needs. These values will use default and run the Web Server at port 80 with the URL of "http://localhost/". There is no virtual (sub-)directory. The web server will crash if there is IIS (or another web server) occupying the port.

Another possible way to do this is by using the Windows Scripting Host. Create a .js file with the following contents:

var oShell = new ActiveXObject("WScript.Shell");
var oFSO = new ActiveXObject("Scripting.FileSystemObject");

var sCurFolder = oFSO.GetParentFolderName(WScript.ScriptFullName);
oShell.CurrentDirectory = sCurFolder;

// to display info, use:
// WScript.Echo('wscript.echo');
// oShell.Popup('test');

var wshEnv = oShell.Environment("PROCESS");
var sProgFiles = wshEnv("ProgramFiles");

var cmd = '"' + sProgFiles + '\\Common Files\\microsoft shared\\DevServer\\9.0\\WebDev.WebServer.exe" /path:"' + sCurFolder + '"';

// Run the web server.
// Run the browser.

Interface elements for jQuery - About Interface

Interface is a collection of rich interface components which utilizes the lightweight JavaScript library jQuery. With this components you can build rich client web applications and interfaces with the same simplicity as writing JavaScript with jQuery.

The collection is dual licensed with the MIT license and the GPL, which basically means you can use it for free for both non-commercial and commercial usage as long as you keep the copyright notice in each of Interface's JavaScript source file.

Interface library contains some nice UI elements and effects such as: accordion, animation, carousel, cart, drag and drop, image boxes, menus, resizing areas, scrollbars, sliders, color picker, slide show, sorting, tooltips, tabs, and windows.

I reckon that the Web UI is getting pretty close to desktop functionality.

Interface elements for jQuery - About Interface

Sunday, June 14, 2009

pidgin-facebookchat - Google Code

Since more and more people are on Facebook nowadays, here is the Facebook chat plugin for Pidgin, should you decide to have a centralized place for all your contact with Pidgin instant messenger.

I have used this program (formerly Gaim) for ages and have almost all my chat accounts still in use – from ICQ in ‘99 to Facebook chat in 2009.  All my contacts from the various networks are in one messenger window.

pidgin-facebookchat - Google Code

Saturday, June 13, 2009

File Upload Web Controls

I am looking for a nice File Upload control for ASP.Net. Ajax calls that enable progressbar functionality are probably the standard at the time. Currently, I have found the following free solutions:

  • NeatUpload (link)
  • SWFUpload (link) – Flash based

Thursday, June 11, 2009

JavaScript Text Editors

Here is the list of JavaScript text editors I have tried.

  • TinyMCE (link)
  • RichTextEditor for ASP.Net Control (link)
  • jQuery RichTextEditor (link)

Sunday, June 07, 2009

Windows 2008 Server - Tips

  • To enable autologin to a system, run “control userpasswords2”. Turn off the check box that requires users to log in to the system.

Saturday, June 06, 2009

Removing Namespace From WSDL

If you need to remove the references to “” from the WSDL of your web service, the following are the steps to do so:

  • Add [ServiceContract(Namespace = "MyContractNamespace")] to the Interface definition. Example:
[ServiceContract(Namespace = "MyContractNamespace")]
   public interface ITest
       string Echo(string str);
  • Add [ServiceBehavior(Namespace = "MyServiceNamespace")] to the service implementation. Example:

[ServiceBehavior(Namespace = "MyServiceNamespace")]
   public class Service : ITest
       public string Echo(string str)
           return str;

  • Add bindingNamespace=”MyServiceNamespace” to each endpoint definition in the Web.config file. Example:

<endpoint contract="ITest" binding="wsHttpBinding" address="" bindingNamespace="MyServiceNamespace">

The above three points will make all the references to “” disappear from the WSDL contract of the service (i.e. http://localhost/MyService.svc?wsdl).

References: eliminating in wsdl (link), wsdl:import namespace (link)

What Files Make Up a Virtual Machine?

Here is the list of the file extensions that may show up in your VMWare virtual machine directory. I am cleaning up the folder after migrating the virtual machine from VMWare to Virtual Box, still using the same disk image, and there are a few files I do not need anymore, even if I go back and run the same disk with a VMWare. Vmdk, nvram, vmem, vmxf, vmx... Which are safe to remove and which are not? Read in more details at the link below.

What Files Make Up a Virtual Machine?

I removed everything else except the virtual disk file (.vmdk) and virtual machine file (.vmx). There were no snapshots and the machine was shutdown properly so no virtual memory file either. In that case it was safe to delete everything besides the two main files. Since I’m already using the disk file with Virtual Box, I could have deleted the VMWare virtual machine file (.vmx) but I decided to keep it just in case.

Friday, June 05, 2009

Running OS on a VMDK disk in VirtualBox

Running an OS that was installed with VMWare on a VMDK disk will not straightforward with Virtual Box. It might be a small but important change but what worked for me was to activate the I/O APIC. Running Windows 2008 Server worked, although I first booted in Safe Mode so I don’t know whether it would boot up in a regular mode. The next boot was OK, with OS installing different drivers, etc.

The issue with this migration is that Windows will require re-activation as the (virtual) hardware signature has changed.


I am trying to save the contents of a Rich Text Editor control, which is HTML, into a PDF file. Below are some links to converters that do this sort of thing. I tested a few to find which one does what I need. The preference is to have a free one that can be used for hobby projects.

And some other…

An alternative is to use XML to XSL-FO transformation (link).

"Hidden" Code Gen Tool in VS2008

Did you know there was a "hidden" code-generation feature in VS2008?  Text Templating Transformation Toolkit  (aka T4) actually debuted in VS2005 Guidance Automation Toolkit, but shipped baked into VS2008.  This gives you CodeSmith-style code-generation templates that can be used in your projects to generate code from any source.  Simply add a text file with the extension ".tt", and VS will add a "Transform Templates" button to the solution explorer window.

Thursday, June 04, 2009

RTE (Rich Text Editor) ASP.NET Control - Home

A Rich Text Editor control for ASP.Net. Haven’t tested the functionality yet but it seems to be good enough for my current needs.

RTE (Rich Text Editor) ASP.NET Control - Home