This Blog Has Been Moved !

This Blog Has been moved to

Finally, I have shifted my Blog to Wordpress. My Wordpress Blog is, the feed address is I will discontinue posting here and will be posting only on Wordpress from now on. This was due for quite some time now because all the Blogger issues I have been having, and specially the Blogger Beta even sucked more than Blogger, nothing could work with Blogger Beta and this ultimately pushed me to move.




Google Launched the Ping Service for Blogs. I don’t think it makes much of difference for Blogger Blogs as they are immediately indexed and are searchable through Google BlogSearch, but for other blogging engines and individual bloggers it is a good service.


So, the speculation which has been around for many days was true. Google finally bought YouTube for $1.65 billion. The price is really shocking considering YouTube only started in February 2005. YouTube growth is really inspirational, in such a short period the company reached to a worth of $1.65 billion with around 20 million visitors per month. Amazing!


More details here

Statue of Yoda !
Originally uploaded by aleemkhan.
Dave Winer posted

this picture of Yoda Statue at Lucas Studios. Actually am testing my Flickr

account to post on Blogger Beta

through mail.

It is a general requirement in any ASP.NET application to restrict the site navigation for certain roles and allow access for others. Recently I had to restrict the site map of my application based on the roles but as I was not aware of the available site map trimming settings, I made a similar model myself adding extra attributes to my site map nodes and as I am using a TreeView control for binding to the SiteMapDataSource, I used the TreeView DataBound method to access the SiteMapNode attributes and then checking their permission from the Database.


Fortunately the ASP.NET 2.0 provides trimming of the SiteMapNodes based on the available Roles from the underlying RolesProvider. You need to provide the roles attribute in the SiteMapNode and specify the role to which this note is accessible (* can be used for all roles).


<?xml version="1.0" encoding="utf-8" ?>


<siteMapNode title="Support" description="Support" url="~/Customers/Support.aspx" roles="Customers" />



You also need to enable the security trimming settings in the web.config as they are disabled by default.



<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">


<add name="XmlSiteMapProvider" description="Default SiteMap provider." type="System.Web.XmlSiteMapProvider " siteMapFile="Web.sitemap" securityTrimmingEnabled="true" />






For More information about the sitemap trimming is available in MSDN here.

The entire authentication and authorization model in ASP.NET 2.0 is quite improved from the previous version. The addition of the new Login Controls and the whole Membership and Roles Management through provider model has really made the entire security architecture easy to use yet extremely customizable.


Last night I was looking for a way to Log-In user automatically (without his password) thorugh my code, actually the scenario is that the user actually logs in from another site and is redirected to my site with the username in the request. Now I have the username, no password and how do I log this user in (or create an authentication token for him). A post from Scott Guthrie came to the rescue. An authentication token for any user even if you do not have him password can be set with


FormsAuthentication.SetAuthCookie(LoggedInUserName, False)


Where LoggedInUserName is the username for which you want to set the authentication token. Now ok I can authenticate the user and log him in but the authorization of my website is set to deny the anonymous user so the user cannot even access the Default.aspx where I actually write the above code for creating a token.




            <deny users="?" />




There is a simple workaround to this also as you can specify different authorization for any particular path/location in your website. So the following will allow access to the default page to anonymous users but restrict rest of the site of the logged in user.


<location path="default.aspx">



                  <allow users ="*" />





Some good resources about ASP.NET 2.0 Authentication and Authorization and Security on the whole are as follows.


Scott Guthrie Post about ASP.NET 2.0 Security Resources


How To: Protect Forms Authentication in ASP.NET


Explained: Forms Authentication in ASP.NET 2.0


Security Guidelines: ASP.NET 2.0


I never used the HTML <Legend> and <Fieldset> until recently when I had to create a GroupBox for the controls on a web page. These tags are really amazing; they create a groupbox with rounded corners with Legend on the top. Actually the ASP.NET Panel control has a GroupingText Property, if you specify this property; the panel renders a field set with GroupingText set as the Legend.


<Legend>HTML Group Box</Legend>

<!--Rest of the GroupBox code -->


Just Forgot to put the link to the Video on the previous post. Here it is

President Musharraf appears on the Daily Show and has some good chuckles with Jon Stewart. Well Musharraf seems to be on a real marketing move for the book, a bit too much I guess.


“In the Line of Fire” by Pervez Musharraf has been released today and already it is promising to be a best seller, well why it shouldn’t be when the President himself has caused sensation about the book by providing controversial excerpts from the book during his recent US visit (even during Bush-Musharraf press conference the book came up). The book is certainly going to earn a fortune for the publishers and Musharraf himself.


I have not read the book, but I would love to read it after all the buzz about the content. However, I have read some reviews and most people believe that the book is definitely ghost written with Musharraf’s insights. Also people believe that book may not be all facts but mostly the views about people and events in Musharraf’s own patriotic and military mind. (I praise him of being a patriot). I also read that the book has really negative views/comments about A.Q Khan and his alleged network of nuclear proliferation, personally I believe like most of the other Pakistanis that the whole A.Q Khan drama was a big cover up from Pakistan government. It’s disappointing though that Musharraf brought all this drama to his book. AQ Khan drama might be true but doesn’t sound realistic because either he is too damn smart and all the Pakistani governments and intelligence during the 90’s were so stupid, or Musharraf and his government has screwed the National Hero really bad.


Overall I am a strong Musharraf supporter (still), he may not be the best option but it’s basically a choice between an arrogant military patriot and a bunch of stupid, illiterate and corrupt politicians, so I go with the patriot.


I’ll try to put down my personal review if I ever get to read the bookJ.

Ansari Called Google’s Lary Page from the International Space Station, a long distance calls indeedJ. Google Blog gives some more insight into the communication, meanwhile Ansari continues to Blog about her experience.


Just saw Anousheh Ansari's Space Blog (She is the space tourist currently on ISS), and read her post which she posted from ISS(International Space Station). Wow ! she seemed to be really enjoying her trip, and who will not ?. Its an adventure of a life time and comes at a cost too ($20 million) ... lol.

Its interesting to read the space experience of an ordinary person and not from the astronomer's perspective. I really wish Space Travel becomes more easy and common (and cheaper :d) in our life times, so maybe then me and Azeem and go on a Trip).... I wish :)

Last week when I was in Pakistan, Azeem (my yonger brother) seemed super excited about blogging, he created a blog at blogspot around six months back but never used it actively. This time its good to see him active. I hope he continues, atleast I'll have some good links on history and politics. :)

Its hard to believe that I am back from the long awaited trip to pakistan, was waiting for this from months and the week passed so fast. Apart from meeting the family after 6-7 months, the good thing about the trip was that I got to attend the first ever REUNION of BCSS01 (my batch) and BCSSF01 (my juniors).

It was a wonderful event, the paticipation was very low from our batch and most of the teachers could not make it but overall it was really wonderful to meet old friends and have a some time together. Its a good start and I really hope this becomes more formal and an official Alumni gathering in the years to come.

Thmbs up to Fahim for floating the idea and all his friends who were involved in making this happen. Another nice thing about this event was that we got a chance to float an idea of a Alumni Sponsored Needy Scholarship for PUCIT students.

Actually I am quite late to blog about this, Fahim has been waiting for haroon and my comments about the event (Haroon does'nt seem to get time to write). Hammad(bunty), Ayaz and Kashif have also written about thier experiences.

I am trying to upload some pictures but this Blogger Picutre Upload is giving me tough time, will upload later.

I just read that POPE In-Person apologized for his earlier address. I think this is very responsible step at this stage. Although Muslim leaders around the world are still outraged and asking for a more direct apology, but personally I think we should not be so outraged in the first place.

Anyway I hope this crisis gets over wihtout any furthur damage.

Surely the Pope’s comments have outraged Muslims all around the world. Although he quoted a previous conversation from history (did not say the controversial sentences directly) but one cannot say that he quoted this for the mere purpose of proving his point. He could have easily given various other examples about the topic “Religion and Politics” (the actual topic of his complete lecture) from the long and Bloody history of Christianity. So, definitely the western interests are be behind this and this may be another way of causing outrage and frustration among Muslims.

However, I do not understand why we are once again so outraged about this. The POPE is not a Muslim, he definitely does not believe in Prophet Muhammad and I think no Christian Does. Also, he does not believe in Islam nor he should be expected to have any respect for Islam or the Prophet Muhammad. So, the POPE or any other Christian believes something wrong and disrespectful about Islam is not something new, at least for me.  

Now some people say, that why don’t the Christians (including the POPE) do not respect our religion and Prophet like we Respect their Religion and Prophet (Hazrat Issa). The answer to this question is that Respecting Christianity is a part of our religion because our religion requires us to believe in Christianity and Hazrat Issa, but Christianity does not require Christians to believe in Islam or the Prophet Muhammad. It is actually the same thing if we analyze how much we respect Hinduism/Buddhism as compared to Christianity because Islam does not requires us to believe in Hinduism or Buddhism. So we do not respect Hinduism and their Gods or their Messengers/Prophet (as they believe) like we respect other religions which are directly mentioned in the Holy Quran.

I do agree completely that according to the current situation of the WORLD, harmony and respect for each other’s religion is very crucial for living together and someone like POPE who influences many should not have given such a controversial example about the 2nd major religion of the world. If this is the issue that we raise and this is the point we stress on, we stand justified (according to my understanding) and we will be able to convey a valid point to the World, but if we take this emotionally and consider this as an attack on our religion (exactly as we are doing now) and react in the same way we did a few months back with Violence on the streets, we will be letting WEST win and giving them another reason to portray a negative image of our humble Religion Islam.

Portraying a Humble, Noble and a True Image of Islam to the world is our responsibility and this can only be achieved by intelligence, wisdom and tolerance not by mere emotions and burning our own countries.

Today was a great day, early in the morning I passed the driving test for the LMV (Light Motor Vehicle) and got the Driving Licnese. I simply believe that it was due to the grace of Allah. I have failed one before in last month, but even getting License in second attempt is an achievement in Dubai.

Now have to start looking for a good car, but probably after I get back from the visit to Pakistan next week. Yes finally going to Pakistan after 7 months, really excited to meet family & friends there.

Got this cool comic in mail, a good complement to a bulk of the irritating mails on the mailing lists, that people keep forwarding without verification.

This is something really intersting, atleast for me this is completely new and is still sort of mystery like what’s going on.  Today I deployed a SQL Server 2005 Database on one of the test servers at office and during the test my application started crashing. I was getting declaration errors form the database.


“Must declare Variable @ApplicaitonID “


It appeared that all the variables were declared but they were declared in difference a CASE and used in different CASE, well this should’nt be a problem, I have been using T-SQL without case sensitivity for long, but when I corrected the case everything seemed fine. The EXEC master.dbo.sp_server_info returned the following results (given at the end) and you can see the IDENTIFIER_CASE parameter set to SENSITIVE, Actually it should be MIXED. Anyway I tried to find how to change this parameter but it seems that there is no direct way to change it.


This parameter depends on the Collation so apperently there is a problem with the Collation, ok now I have to change the Collation to SQL_Latin1_General_CP1_CI_AS From Latin1_General_BIN. Now chaning collation on the database server is a long hard process, you have backup all your data and tables and reinstall the Database Engine with different collation and restore everything back.


The First thing I do not understand is that why collation is applied on the Variable Names (T-SQL Syntax), I always thought collation was something only for the comaprison/Case-Sensitivity of database data and something which will not be used for procedure compilation. I do not understand this and I’ll have to find some answer for this.


Secondly, SQL Server 2005 supports different collation settings for each database and the Database Engine itself, and the collation settings on the copied database was fine. I even rechecked it and even tried to set it again but still even with the correct collation I continued to get the same Errors, I opened a procedure from database with the correct collation in Management Studio and tried recompiling it, but it was giving a recompilation error because of the case insensitivity. If SQL Server 2005 supports different Collation settings for Server and each individual database why I keep getting this annoying error.


If some can explain this to me I will really appreciate.



EXEC master.dbo.sp_server_info


attribute_id attribute_name               attribute_value

------------ ---------------------------- ---------------------------------------

1            DBMS_NAME                    Microsoft SQL Server

2            DBMS_VER                     Microsoft SQL Server Yukon - 9.00.1399

10           OWNER_TERM                   owner

11           TABLE_TERM                   table

12           MAX_OWNER_NAME_LENGTH        128

13           TABLE_LENGTH                 128

14           MAX_QUAL_LENGTH              128

15           COLUMN_LENGTH                128

16           IDENTIFIER_CASE              SENSITIVE

17           TX_ISOLATION                 2

18           COLLATION_SEQ                charset=iso_1 collation=Latin1_General_BIN

19           SAVEPOINT_SUPPORT            Y

20           MULTI_RESULT_SETS            Y

22           ACCESSIBLE_TABLES            Y

100          USERID_LENGTH                128

101          QUALIFIER_TERM               database

102          NAMED_TRANSACTIONS           Y

103          SPROC_AS_LANGUAGE            Y

104          ACCESSIBLE_SPROC             Y

105          MAX_INDEX_COLS               16

106          RENAME_TABLE                 Y

107          RENAME_COLUMN                Y

108          DROP_COLUMN                  Y

109          INCREASE_COLUMN_LENGTH       Y

110          DDL_IN_TRANSACTION           Y

111          DESCENDING_INDEXES           Y

112          SP_RENAME                    Y

113          REMOTE_SPROC                 Y

500          SYS_SPROC_VERSION            9.00.1399


(29 row(s) affected)




What a classic from Pathanay Khan, but you must have some sort of taste for classical music. 17 minutes of amazing voice and music ! ........ took most of the days pressure off my mind.

I go thorugh various blogs, but I thought I should atleast have links to all the Bloggers I personally know, from work, university, old friends even college etc, so its easier to get in touch and see whats going on with them.

I keep loosing this one guy Haroon Shafiq, my Senior from University. I found his blog in december last year, but now when I open the link I get some advertisement site.

I tried to find him and found another of his blogs here, does'nt seem to be his active blog, only 2 posts.

BTW one of the post had an ineteresting story.. lol ...

Was just working on interface of my application last night, and had to make few changes for background of buttons. I used background-image CSS property for setting the images for my buttons, everything looked fine untill I tried to access the application on Windows XP. Oh ! no background is displayed on XP.

Interestingly its a known Bug in Internet Explorer 6.0 which uses windows XP themes to render its controls, now thre are a couple of solutions to this, one is to use background istead of background-image and other is to include this

<meta http-equiv="msthemecompatible" content="no">

to disable XP themes on the page.;en-us;322240&Product=winxp

Just read something Interesting about Google Strategy.

Marc Canter has an interesting post about the strategy of google, and how Google is trying to "lock-in" the end-users/developers by using and following thier own proprietary protocols (developed based on open protocols) but not completely open something what Microsoft did through 80's and 90's.

Also check the Mouse Trap Post by Chris Messina on the same topic, but as Rebert Scoble pointed out it would be nice to hear what Google Says about this.

Peronsally I haven't seen many Google Blogs !

According to awaited decision of International Astronomical Union, Pluto is no longer a planet and will be classified in a new term "dwarf planet". The Solar System will now have total of 8 Planets.

Other celestial objects in our Solar System like Ceres and UB313 (Xena) which were highly expected to be declared planets will also remain in the "dwarf planet" category. Pluto's moon Charon remains without a category and is not classified at the moment.

I was just going throuh some of the space articles and found about the Concept of Space Elevator. I have seen many fictitious concepts about space but what amazes me about the concept of a Space Elevator is that it is theoratically not only possible but companies are actually working on the concept and NASA seems really interested too.

Anyway this is understandable that it is not something that is going to happen in 10 years but maybe after 50 years you may actually have a trip to space in a Elevator suspended from earth ! . The Concept is pretty simple, if you tie a thread on a side of a rotating ball with a small counterweight on the other side of the thread, due to the centrifugal force produced by the rotating ball, the thread will strat revolving with the ball and will seem as a suspended rope from the surface of the ball.

So if a 62,000-mile (100,000-kilometer) rope is suspended from the earth into space with a couterweigt attached on the other side of the rope, it will start spinning becuase of the centrifugal force of the earth, now if this rope is strong enough an Elevator Car can be attached to to it and can be used for transportation.

However, this rope cannot be directly attached to surface of the earth, but can suspended through a non-stationary plaform like an oil rig in the sea so it has some margin for movement becuase of winds and other hazards. The major hurdle in such a design was the availability of a material string enough for the rope, but now with Carbon Nanotube (discovered in 1991, 100 times stronger than steel and 1/5 in weight, a single thread of Nano Tube can easily support a full Saloon car) the material to build the Elevator is available.

Anyway It's an extraordinary idea indeed

Fahim posted about the My Heritage Face Recognition and how he got very different results with different images. I also tried with one of my images ans I observed that it has largely different results even with the same image when it is flipped, or even slightly changed. I believe the face recognition agorithm they are using is not extracting the features of the face but only comparing with the complete face, otherwise flipping the face should not made such a big difference.

Here are the two results.

I have been looking for a better soltuion for writing Blogs offline, Blogger does allow me to send Blog through mail but for images I always have to go through a lot of trouble for uploading images. I was just seeing the Fahim's Blog and found this post about Windows Live Writer (actually most of his posts are intersting), its just I was already looking for a Blog Writer.

It's nice but unfortunately still does'nt work with the images. I think it is more of a Blogger Issue, it has a wiered way of supporting images. I am really considering shifting to wordpress, blogger is getting too far behind on the all features other blog services are providing.