Saturday, May 07, 2005

Setting up Debugging ASP (vanilla Active Server Pages, not ASP.NET) has always been tricky. I remember doing it for the first time as early as 1998 or so. It was during MS Visual Interdev launch in Chennai, which happened to be my first presentation for Microsoft India as well. Those days, it was on Windows NT 4.0 SP4 & IIS 4.0. The whole installation normally would take those days (with those ancient hardware) about half a day.

Anyways, today we were setting up a web application that was written by us long time back on ASP. We successfully restored the DB, copied the source into a Windows 2003/IIS 6.0 machine and tried to run. We got strange errors and figured out that if we are going to get this working, we need to debug the application line by line. So started the effort of getting a simple ASP page debugged in Windows 2003. After nearly 4 hours strangely I got it working across 3 different OS configurations!

Before going to the steps, remember that setting up Native Debugging (in fact, any form of Debugging) in a Production Web Server is a big security risk and performance degrade, so please do it only on your Development machines.

Windows XP (32-bit) SP2, IIS 5.1 & Visual Studio.NET 2003

  1. Ensure the currently logged in user who is running Visual Studio.NET is a member of the "Debugging Users" group in the computer.
  2. Ensure you have IIS 5.1 installed with Frontpage extensions enabled. Try creating a simple Visual Basic.NET ASP.NET Web application and run it. 
  3. Once it runs successfully, add a new file into the project and name it "Check.asp" or any other name, but .asp file extension. Then have a simple <% Response.Write ("Welcome") %>  ASP line, setup the breakpoint on this line.
  4. Run VS.NET 2003 Setup, and ensure you have either Native Remote Debugging or Full Remote Debugging (as shown below) enabled. I think these features are available only VS.NET Enterprise Editions. If not, have it installed. 
    Visual Studio.NET 2003 Remote Debugging
  5. Then right-click on the VS.NET web project properties, in Configuration Properties -> Debugging, select ASP Debugging  (as shown below)
    ASP Debugging in Windows XP (32) with Visual Studio.NET 2003
  6. Open in Notepad URLScan Configuration file (normally found at C:\WINDOWS\system32\inetsrv\urlscan\urlscan.ini). This comes pre-installed with Windows XP SP2. Add a line in the [AllowVerbs] section, DEBUG. This is to add an allowed Verb, in this case DEBUG, HTTP method.
  7. Go to IIS MMC Snap-in. Right Click on Web Sites, go to Home Directory Tab, click on Configuration button. Goto to Mappings tab, select .asp row, click Edit. In that dialog box, select All Verbs (as shown below). Press OK all way down.
    Allow All Verbs in your ASP mapping
  8. Reset IIS, using IISRESET command from Command Prompt or IIS Snap-In.
  9. Go to the VS.NET Web Application, right-click on the ASP file (Check.asp) and Set as Start Page.
  10. Run the VS.NET application in Debug mode by pressing F5, you should hit the break point.  Good Luck.

The above steps work only if both IIS and VS.NET are on the same machine and you are also administrator to the box. Both these may be rare (and potential security bad-practise) in a real scenerio.  In that case refer to my general items to check at the bottom.

Windows XP (64-bit) or Windows 2003, IIS 6.0 & Visual Studio.NET 2003

Windows XP 64 bit, ships with IIS 6.0. So remember to Allow the Active Server Pages, in Web Server Extensions page in IIS snap in. Apart from this you should follow all the steps I have told above for Windows XP 32-bit.

Some webpages, talk about running IIS 6.0 in IIS 5.1 mode, I don't think so it is necessary. IIS 6.0 perfectly supports debugging of ASP pages with VS.NET 2003.

Windows 2003/Windows-XP (64 bit), IIS 6.0 & Visual Interdev

  1. Ensure your IIS is up and running.
  2. Then Allow Active Server Pages, in Web Server Extensions page in IIS snap in.
  3. Create a simple ASP page, run it and check that it is working correctly.
  4. Have the second CD of Visual Studio 6.0 handy. Launch the setup and select "Server Components", choose "Backoffice Server components", press Install, in that ensure you have Visual Interdev Server and Remote Debugging components selected. Install them.
  5. Reboot the machine.
  6. Install Visual Studio 6.0 Service Pack 6.0 and Reboot the machine.
  7. Create a simple Web project in Visual Interdev and run it. Most probably your Front Page Server extensions will need tweaking, set it up.
  8. Create a simple ASP page, name it "Check.asp" or any other name. Then have a simple <% Response.Write ("Welcome") %>  ASP line, setup the breakpoint on this line.
  9. Refer and ensure you have all the points mentioned in my section "General Items to check" below, especially #2 & 3.
  10. Run it, it should work. If not doesn't worry, normally it takes more than few hours to get this working especially with IIS 6.0.
  11. Refer to this support page at Microsoft at "INFO: Visual InterDev 6.0 Debugging Resources", which contains a host of links on this issue. Since many of the contents here are dated and for Windows NT 4.0/9x,

General Items to check

Even with all the above, you couldn't get it working, check out the following:

  1. Ensure the currently logged in user who is running Visual Studio.NET is a member of the "Debugging Users" group in the computer. You may also want to add "INTERACTIVE, NETWORK SERVICE, IWAM_MACHINENAME" users into the group for testing and once everything works out, keep removing them one by one.
  2. The official pages: Visual Studio Remote Debugging Setup index page and ASP Remote Debugging Setup. The second link talks of adding few registry keys. For convenience, I have saved it as a text file here. Download and save it in your machine with .REG file extension and run it. It will add the necessary registry keys.
  3. Check whether you have enabled ASP Server side script debugging enabled. This can be done in IIS Snap In, Web Sites, Right-Click Properties, Home Directory Tab, Click on the configuration button, go to Debugging Tab (as shown below):
  4. Go to Component Services from Control Panel. Go to Computers->My Computer->DCOM Config, in that select the Catalog Class object. Right Click and go to Security Tab. In that Select Access Permissions area. Select Customize, press Edit and ensure to add all the relevant users (like IWAM_MACHINENAME, NETWORK SERVICE, INTERACTIVE, etc.). NETWORK SERVICE user will exist only on IIS 6.0 (Windows XP 64 bit and on Windows 2003), so if it doesn't exist, it is OK.
  5. In the Catalog Class properties dialog, select Identity tab, ensure "The Launching user" is selected.
 
Saturday, May 07, 2005
This thursday when I was signing a letter, I wrote that day's date as 05/05/05 (dd/mm/yy format). It suddenly dawned on me that the day, month and year are same. Interesting but useless fact, right? :-)
 
Sunday, May 01, 2005

Media is not new to me :-), I have spoken in All India Radio Chennai a few back on “இணையத்தில் வணிகம்”, during my school 12th standard participated and came second in a popular Chennai Doordharshan (TV) Quiz programme conducted by Prof. வா.வே.சு.

But today was different, my first full 30 minute long TV Interview was live today in Sun News Channel from 5:30PM to 6PM. The Interview was hosted by Mr.Maalan of Sun News Channel. I was invited for the programme on Tuesday and I was informed the recording will be on the next day 3PM.


Images Copyright Sun TV Network 

Anxious about my first Television Interview, I rehearsed on my demos, went to a Beauty Saloon and even had my laptop cleaned (the demos were to be shot from my Laptop Screen). But the actual recording was smooth, got over in less than 1 hour, first shoot itself got Okayed and above all Mr.Maalan made me feel at home during the whole interview.

The interview was about the features of Microsoft Office Tamil – Word, Excel, PowerPoint and Outlook in Tamil.

Watch it this time!. A repeat of the same programme will be live this Thursday (5th May 2005).
 
Tuesday, April 26, 2005
After my earlier post on MS Office 2003 Tamil LIP, I had several enquires on where you can download this. The single source for all Indic Language related information and download from Microsoft is the Bhasha Portal.
 
Having said that, here is a cheatsheet for trying this out:
1) You need Windows XP (Pro of Home) as your Operating System.
2) In Windows XP, go to "Regional and Language Settings" applet in Control Panel. There in the Second Tab, titled "Languages" Enable “Install Files for Complex Scripts and Right to Left Languages (including Thai)” option as shown below.
 
 
3) Download & Install: You need Office 2003 Software. An evaluation (trial version) of this is available from Office Website here.
4) Download & Install: The next is Tamil Language Interface Pack (LIP) for MS Office (Office 2003 தமிழ் இடைமுக தயாரிப்பு) available from here
5) Run from Start Menu, Start->All Programs-> Microsoft Office-> Microsoft Office Tools->Microsoft Office 2003 Language Settings, program. In that, on the first tab as shown below, select “Tamil” in the "Display Office 2003 in" listbox:
 
 
6) Finally, on the same application, in the second Tab titled “Enabled Languages”, Add “Tamil” as one of the Enabled Languages as shown below:
 
 
That's all. Enjoy MS Office 2003 in Tamil.
 
Tuesday, April 26, 2005
As part of our Portal Management solutions, we are asked to do server sizing for many of the projects. We work with ISPs & Hardware partners in calculating the precise configuration. In the early Internet days this was purely a "guessing" game. Now it has become more and more closer to a science and if the customer has worked hard in their projections, we can get it right to large extend.
 
A few weeks back, one of our customers came with a requirement which is worth sharing here.
 
The Portal was expecting 30 Million Pageviews Per month - this was arrived by taking 10 Million Unique Users and Average PVs (Page Views) per user per month of 3. Each Page (including images) is expected to be roughly about 100KB (KiloBytes). Using this our monthly data transfer works out to 3000GB (per month). You may want to add 20-30% buffer and make this as 4000GB per month. Next comes the question of the dedicated pipe that you need for doing this data transfer per month. ISP's generally recommend a 1.5Mbps pipe for every 175GB/month. At this rate we will require about 34Mbps pipe to do the 4000GB/Month traffic.
 
I cross-checked this calculation with my ISP who said a rule of thumb they follow is 3x of the average will be the peak bandwidth requirement. So how do I calculate the average bandwidth requirement for 4000GB/Month. Answer is simply to key this in Google "What is 4000 GB/month in Mb/s?", we get 12.4Mb/s as result. Three times of this average is 37.2Mbps, which is near to our initial estimate of 34Mbps.
 
Tuesday, April 26, 2005
After years of delaying the opening of a branch in Bangalore (India's Silicon Valley), I finally did it. Last Sunday on the 24th, the Inaguration Pooja was performed for Vishwak's branch office in Sanjay Nagar, Bangalore.  
 
My Colleagues (From left to right)
Harish, Bala, Pragathi & Myself
 
Tuesday, April 19, 2005

 
Myself seen doing the demo in தமிழ் of
Microsoft Office 2003 Tamil LIP

Last Friday was a very special day for me, I did a demonstration on a stage that seated the "Who's Who?". The special event was one in which Microsoft India launched their Tamil Inteface Pack for Microsoft Office 2003. C-DAC with association with Government of India also released a free Fonts and Software Tools for Tamil CD. The event was hosted by Mr.Dayanidhi Maran - Cabinet Minister for IT & Communication and was attended by Dr.Kalaingar Karunanidhi - Former Chief Minister Tamilnadu, Mr.G.K.Vasan - TN Congress President & other distinguished attendees.

From Microsoft side Mr.Ravi Venkatesan, Chairman, Microsoft India spoke about the virtues of Microsoft Office Indic Editions. He also said briefed about Microsoft's localization efforts through Microsoft Bhashaindia.com portal, which is aimed at taking IT to the Indian grassroots. I followed Mr.Ravi Venkatesan to the demo of Microsoft Office 2003 Tamil LIP in தமிழ். Giving presentations is not new to me, that too presentations on technology or in my mother tongue தமிழ் (Tamil). But doing the combination - a technical demo in தமிழ் needs good preperation. The time given was also too short (10 minutes), so I prepared for almost half-a-day to do this correctly. At the end, the presentation went so well, that I received applause for couple of times from the gathering and I was told that the minister also complimented my demo :-).

You can download from here, the demos I showed on that day. The demos are in WinRAR format, as the file names are also in Tamil (Unicode) and RAR format preserves it. You can request from C-DAC's ILDC Website or email CDAC a free delivery of their CD or you can also download it.


Mr.Ravi Venkatesan presenting the
Gold CD of MS Office Tamil to
Chief Guest Dr.Kalaingar Karunanidhi 


A view of the distinguished speakers on the stage, during the
launch of Office Tamil and CDAC Tamil Software tools CD

 
Friday, April 15, 2005

நேற்று இரவு ஒரு டின்னரை முடித்துவிட்டு, நானும் எனது விருந்தாளியும் காரில் ராதாகிருஷ்ணன் சாலையில் வந்துக் கொண்டிருந்தோம். மணி  சுமார், 11:30pm இருக்கும், நான் தான் ஒட்டுனர். சாலை குறுக்கே பல காவல்துறையினர், வரும் ஒவ்வொரு காரையும் நிறுத்தி சோதனை செய்துக்கொண்டிருந்தனர். எனது காரை நிறுத்திய ஒரு காவலர், மிகப் பவ்வியமாக "சார், கோவிச்சுக்காதிங்க வாய கொஞ்சம் ஊதரிங்களா?". அவர் கேட்டவிதம் எனக்கு அச்சரியம், சென்னை காவலர இவர்!.

கதையை தொடர, ஊதினேன், "ஒன்றுமில்லை, போலாம் சார்" என்று என் காரை அனுப்பிவைத்தார். 

 
Monday, April 11, 2005

Recently I came across The World Fact Book, this is a US Government's CIA website that provides comprehensive information of all countries - their geography, history, economy, people, culture, concerns and more.  Unlike the popular belief, seeing this site you will get convinced that US Government is well informed about rest of the world!.

Two sites I normally turn to for Encyclopedic content - the first is MSN's Encarta and the other is free Wikipedia. Wikipedia even has a Tamil Encyclopedia (if you notice even this URL has a Tamil folder name!)

 
Monday, April 11, 2005
Two weeks back I was on a holiday to Guruvayoor & Munnar. Guruvayoor is one of the most regarded holy places in South India, it has a popular Lord Krishna Temple (Krishna in his child form). Munnar is a lovely hill station about 3 hours drive from Cochin, Kerala.
 
The Guruvayoor temple devasthanam maintains a well run Elephant santuary, which has over 65 elephants of different age, sex and origin (from various places of India). It is fun to watch the elephants get bath, eat, walk & even dance.
yanakotai_32.jpg
Elephant at Guruvayoor Yanakotai
yanakotai_42.jpg
Young Dancing Elephant
yanakotai_22.jpg
Elephant given bath by 3 keepers
yanakotai__12.jpg
Elephant transporting its food
view_from_rajamalai.jpg
View from Rajamalai (The Highest point in Munnar)
sunset_internationalpark.jpg
Sunset as seen from KSEB International Park
venkat_in_rajamalai.jpg
Venkatarangan in Rajamalai
nilgiri_tahr_in_rajamalai.jpg
Nilgiri Tahr (A Deer Like Animal) in Rajamalai
 
Sunday, April 10, 2005

In my last post, I mentioned that I am using Sauce Reader to do my postings. Though I managed to do text only posts, I am having problems with posts that include images. Sauce Reader supports two image upload options - MetaWebLog API and FTP. MetaWebLog is not supported in dasBlog 1.7.x and for some reasons (which I am yet to figure out), my FTP server refuses to get connected from Sauce Reader or even from IE. My FTP server gets connected only from GlobalScape CuteFTP, even though the FTP server is Windows Server 2003/IIS.

While using Sauce Reader I noticed that its UI looks sharp and clean; curious on the 3rd Party controls they could be using I went into the "C:\Program Files\Synop\Sauce Reader" folder and I noticed they used a handful of third-party components (a combination of free/commercial). I found the list of components impressive, so giving them below:

  1.  .NETXP  - This is a set of free packages that include lots of Windows XP like controls, Alerts, Reusable forms, Wizards, FTP Client, MSN Messenger/Outlook style alerts and more. Check it out. [Free & Commercial]
  2. .NET Components from Chilkat - Seeing their website this company seems to make lot of email, HTML related components for .NET & ActiveX. [Commercial]
  3. XML-RPC.NET from Cook Computing. [Free]
  4. esellerate - A Software commerce Provider. [Commercial]
  5. NET Html Agility Pack from Simon Mourier - An agile HTML parser that builds a read/write DOM and supports plain XPATH or XSLT [Free]
  6. SharpZipLib - A Zip, GZip, Tar and BZip2 library written in .NET. [Free]
  7. Infragistics Windows UI Development Tools [Commercial]
  8. Apache log4net - A tool to help the programmer output log statements to a variety of output targets. [Free]
  9. Lucene.net  - Lucene.Net is a byte-to-byte port to .NET of Jakarta Lucene a high-performance, full-featured text search engine library written entirely in Java. Now it is commercially available as Search Black Box[Free & Commercial]
  10. NetSpell SpellChecker  - A free .net Spell Checker. [Free]
  11. Microsoft Application Block [Free]
 
Sunday, April 10, 2005

Since I do little printing on paper and I have a variety of printers available in my office, I have so far resisted the idea (mine and my wife's) of buying a printer for my Home PC. Though my Home PC is fully loaded (P4 HT, 1GB RAM, 180GB x 2, DVD-RW, CD-RW, TV Tuner, 17" LCD, DSL, FireWire, USB) , till now I only had a scanner for emergency scan and email.

This week, when I wanted to scan and email an important document, the scanner decided to die. Frustrated, the next day as soon as I went into to office, I ordered for a top of the art, HP All-in-One Home device. Yesterday, the vendor delivered HP PhotoSmart 2608, which is a Colour Photo Printer (meaning it can print photos on special paper), Scanner, Fax & Copier. It includes a LCD Display for settings and Photo viewing, USB & Ethernet Interface & multiple memory card slot readers. In Chennai it costs Rs.14,600/-. I installed it today morning and so far happy with the print and scan quality.

Previously whenever I got to install any new device on my home PC (my Systems guys don't let me do it in the office :-) ), I go straight ripping the package, connecting the power, installing the software and after few hours, turn to the manual. Today, I decided to act wise, I first read everything in the box, including the instructions on how to open the box and remove the printer. Then once I found the setup instructions, I went through it religiously one-by-one, all the way through the 20 odd steps and got the printer installed. It turned out to be good idea, as without the proper steps, this could have taken me hours to figure out. 

The first time the software installation failed with some crazy MSI error. It offered to uninstall and reboot. I did that and reinstalled the software, everything went fine this time. During the software installation I noticed two things, that it required Microsoft .NET Framework (and installs it, if it doesn't find one) and it took more than 30 minutes to complete it (probably on my machine, Windows XP itself doesn't take this long). When I say 30 minutes on installation, I meant purely the file copy/settings time it took and it doesn't include the waiting for user-response time or detecting the printer, etc. Definitely a long time...

 
Thursday, April 07, 2005

I have been using Sharp Reader for reading all my subscriptions and  using the Web UI of dasBlog to do my postings. Though I love Sharp Reader for its simplicity, lately I was feeling down because an update for it is long overdue.

Anyways, after trying out Newsgator, FeedDaemon and others now I am using Sauce Reader. I like the neat Interface, especially the clear, legible fonts (I guess enhanced by Clear Type). I will likely stick with this, will keep posted on how my trial goes.

This posting is posted from the WebLog feature of Sauce Reader - hope it comes out clean.