February 2007 - Posts

Orcas March CTP is out!

finally the orcas CTP is out... i guess the second release will be in beta.. anyway you can get it from here http://www.microsoft.com/downloads/details.aspx?FamilyID=cf76fcba-07af-47ac-8822-4ad346210670&DisplayLang=en

OpenID anti-phishing technique

If you are using OpenID i strongly recommend that you use this little feature which is allow you to upload an icon or personal picture to display it in the verification site (myopenid.com) title bar so if you didn't see this picture theres a chance that someone trying to phish you.

The idea is that if some one make a sam page like myopenid.com he wouldn't know which picture you choose to display, the picutre will be stored in cookie.

will be displayed, for your browser on this computer only, in this site's title banner. Since no other site will know what image you uploaded, they won't be able to display it. This means that if you see your image in the title bar, you're talking to this site and it's safe to use it. If you see something that looks like this site, but without your icon, you should be suspicious.

for more information click here.

Posted by Adel Khalil with no comments
Filed under: ,

Enable your ASP.NET for OpenID

I wrote about OpenID before and today i came across Andrew Arnott post about how to enable your ASP.NET website for OpenID

Posted by Adel Khalil with no comments
Filed under: ,

For every girl out there

This story of the sacrifice made by a geek/nerd whatever you want to call, but this is for every girl out there to know why a geek makes a great husband.

http://seattlepi.nwsource.com/business/1700AP_TechBit_Aliens_Laptop.html

Posted by Adel Khalil with 4 comment(s)
Filed under:

I'm not the "Only for you support desk"

This is really getting ridiculous when people in your Live Messenger contacts or skype start using you as their own helpdesk.

I used to have family and friends who is not in IT biz turning to me in every teeny tiny detail asking advice on computers hardware, software even gadgets as if you should knew it all okay that's family close friends.

few moments ago.. I came back from Cairo. was very tired but forced to have some work dome for tonight as I hate to spend the day with nothing crossed of my to-do list.

so I'm blogging now that I didn't do anything and was way better for me to go straight to bed, Why is that...

because people start to using me as their helpdesk.. and it's not only IM chats also voice calls on skype.. and complain if I didn't answered them right away.. or got distracted on my own work and by the way all the answers are googable.

but the unbelievable thing is that *beep guy who IM me saying that he wanted to know certain information and when I said okay Google: certain items, he replays I don't know how to do it you will. (If you didn't get it: Somebody is lazy)

And I'm really into help people and love to have great questions that I will benefit from knowing it's answers as much as he will, but I will not participate in any dumb or googable questions and if you can't use simple service like Google search and you will always ask those unbelievably painful questions I may lose it and turn you into my own personal hand puppet.

Posted by Adel Khalil with 4 comment(s)
Filed under:

OpenID and all the hassle goes away

Hi Mates, i'm really exited with this identity  model which was around since 2005 but maybe the commercial suppory by ViriSign and others what brings it to the surface anyway..

i'm not in the place of comparing OpenID to CardSpace or any other existed paradim just hinting on how to create your own OpenID account which will help you sign-in to many web sites and the number is growing..

the idea on single sign-in was existed for a while with Yahoo, Google and Microsoft with Yahoo Single Sign-in, Google Accounts and Live Passport respectively.

What is OpenID?

OpenID is the way to sign-in/log-on any OpenID supported site without prior registration even if this is the first time you visited that site.

Why OpenID is usfull?

First you will no longer register on every site you want to use you already use your OpenID (universal passport) to log to that web site so you skip all the haslle of choosing uniqe names and dealing with diffrant password polices, also don't have to fill all this application form very time.

With OpenID (and similar paradims) you will have the peace of mind knowing that all your valuable information is store in only one secure location - Identity Provider - that you trusted.

For Developers/Site Owners?

You will benfit as you will not to have to store all the information of visitors like username, passports, emails and other info at your end and worrying about security issue which may lead you in trouble in case your database compromised.

How it works?

You will register at www.myopenid.com - Identity provider - to have your uniqe OpenID account and you good to go! yes it's that simple.

Now you can use your new universal credintial to log into any web site that support OpenID and when you do so the web site you try to log to will contact your identity provider the Identity provider in our case myOpenID - and you will be redirect to that provider - will tell you that certin web site - the one you want to log to - is requisting information like Nickname, Fullname, email.. and now you can choose weither to give these information to that website or some of these info like only the nickname and email and don't disclose your full name as some of these requists maybe optional - the requister determin - and then choose to allow these information once or automaticly - like choosing remember my password - so you can always allow this informatuion for that certin web site.

and once you have allowed the information you will be re-redirect to the web site as a logged user.

Your domain or blog address as your OpenID

This is cool and stright forword at the same time - not all cools stuff that easy - you will have couple of line in the <HEAD> tag of your default page of your blog or website.

and the same scenario applied but the identity provider will check those couple of lines and match your account.

for instant in my index.html <HEAD> tag i added those couple of lines so i can use my domain name www.adelkhalil.com as my OpenID

<link rel="openid.server" href="http://www.myopenid.com/server" />
<link rel="openid.delegate" href="http://adelkhalil.myopenid.com/" />
<meta http-equiv="X-XRDS-Location" content="http://adelkhalil.myopenid.com/xrds" />

as you see http://www.myopenid.com/server is my identity server, http://adelkhalil.myopenid.com/ is my OpenID account that i created when i registerd.

More?

yes, at www.myopenid.com you can choose multiple persona which is like multiple profiles that you can pre prepare and give it to any requister (web site you want to log to)

Hope it's now appealing as it is to me..

That doesn't mean that this model don't have flaws but what doesn't. Daniel Renfer post about OpenID security issues .

Theres also podcast by Scott Hansleman about OpenID recommended to listen too.

UPDATE: It come to my knowalage that Microsoft will support OpenID by developing integration with CardSpace

kick it on DotNetKicks.com
Posted by Adel Khalil with no comments
Filed under: , ,

Nasty joke, Security by sense

Couple of days ago i have received this mail from one of my former colleagues the email goes like "This is a love calculator that you will supply it with three of your secret lovers and your name and it will tell you which one is THE ONE".

So as we approaching Valentine day i thought it's good to know who buy roses to ;) so i navigate to the link.. and entered three of my ex-girlfriends names and my name in the  appropriate box and before clicking submit i suddenly got this feeling that there's something wrong.. i reviewed what i have did.. i disclosed important information to unknown web site and it just didn't feel right i thought maybe this will submit the names to database or send them to someone.

so i kept the girls names and changed my name to fake name and click submit and as i expected the redirect-to page saying

Oops... You have been fooled! !!!!
The names off your secret loves you typed on the last page has been sent to: ********** at
************@gmail.com
She or He knows all your secret-crushes now !!! 

So as i submited with my name faked the one who tried to fool me end up with three real names but he does't know to whom they belong.

Now as a Developer reads hundreds of article and involved in the software biz that all focused on security i was inches to disclose my personal affairs very easily.

That's give you the idea of how phishing and impersonation breakthrough and how the human factor is the weakest in the security chain.

Last thing could you sue someone if he sends you such links?

http://www.secret-loves.com/index.php?pagina=participate

Posted by Adel Khalil with 2 comment(s)
Filed under: ,

Improve Windows Forms performance

This post is particularly for me as I always forgot those great tips and hard to find them back in MSDN Magazine or other resources, so I figure by putting them here will end up using them more also dear reader enjoy them too I'm sure you will find something you don't know or forgot a while ago.

fire your application faster

You can accomplish this by many ways starting with not populating the databoud controls in the load event directly instead have them on serrate thread so they don't block the UI while they linking to data source and rendering.

If you are using .NET 2.0 then you pleased with the new BackgroundWorker component that will delegate the work into background thread - will talk in details about BackgroundWorker in other post .

Now the most important part which is will boost your application startup is using native image generator NGen which is available with .NET Framework SDK since version 1.1 at least.

couple of days ago I have attended session about improving application startup performance by NGen within MDC presented by Surupa Biswas Program Manager on CLR Team and with the demo she showed us the difference between launching Microsoft Expression Blend with and without NGen images like the difference between shooting a bullet and throwing it and this also speak of a seprate post.

faster UI and Controls rendering

Always use BeginUpdate() and EndUpdate() to supress repaiting the controls while it's collection changing like the case of ListBox and ComboBox.

The neat trick i wouldn't thought of before by Milena Salman is when you hard code the data binding to a control is to assign the Control.ValueMemebr first then Control.DataSource couse assining the data source first will couse the control to repopulate.

Also notice that if you add controls at runtime, change or resize any existing controls will couas the parent control to fire Control.Layout event, so be sure to use SuspendLayout and ResumeLayout on the parent control when playing with the child controls.

Don't lean much on garbage collector

Not becouse GC will let you down but for instant finalizing managed resourses within your code is less expensive by letting GC do the job also don't forget to use the using keyword with unmanaged resources, if you do finalize an unmanaged resource by yourself call the GC.SuppressFinalization to save a GC cycle.

Posted by Adel Khalil with 14 comment(s)

Help fight cancer!







The fact that we (Developers) get paid and make living from doing what we love is a targeted by grudge from all other professions so imagine if you WORK + GET PAID + FIGHT CANCER.

When i was at the closing session of MDC 2007 i have catch Stephen Forte for a few words before i leave when he mentioned this great opportunity so i thought i share for those who didn't know about it.

How this could be done?

Microsoft sponsoring a project will be built by interknowlogy for Scripps Research Institute that will help the institute and now they are looking for great .NET Developers with normal requirement

Why i even care?

By adding this new dimension this become an odd opportunity to help change the world, just think of when a cure for cancer discovered or just being involved you can set back and relax thinking your part for the others is well done.

How to apply?

The recruitment is done by Stephen Forte the Microsoft Regional Director for NY & Metro area so you can go to his blog (The only way to apply) here.

Posted by Adel Khalil with 3 comment(s)
Filed under: , ,

The (Un)Offecial comic of blogsphere

Dave Burke posted about this cool web place where you can find comics about us(bloggers)!

http://blaugh.com

Dave forgot who turned him to this web site, but i do.... thanks Dave.

This one is great... really trash talk :)

Modern Day Bully
Posted by Adel Khalil with 1 comment(s)
Filed under: ,

Custom Mempership Provider for preventing DoS

Hours ago i had a chance to attend for one of my favorites speakers who always speak at Middle East Developer Conference, my list of great speaker include more world first class speaker.. which is a subject i will talk about more later.

The speaker for today was Patric Haynds the CTO of CriticalSites which is a Boston based company foucesd on security at the most.

Any way at the session Patric present was about many tips and tricks for ASP.NET but most part that caught my attention is the problems with the base membership provider login policy. the problem is that if you have entered the password wrong in the password field for say three times you can adjust the base membership provider to block the user from further trials or you disable this and the user can try as much as he needs to figure out what he is messing. so this will cause a problem in the one hand you can't leave the login process open for trials as in the last some one have the time will be able eventually to discover it and gain access to your account and in the other hand if you smart enough to have the login process block the user for over three failed trials this can cause another problem.

If you pest of someone you easily can use his username and navigate through the website and enter his username and three wrong password to have him blocked, you can even write script to that every five minutes so this creates a way of denial of service.

So what is the solution, as Patric describes you have the choice to accept the fact or have the usernames secret. But you always can implement your own Custom Membership Provider that for instant if he receives more that three failed trails he can expand the question to include more than the username and the password like asking him what is his secret question or any question related to his account activity.

what i have liked is how the problem is simple yet the solution is simpler and efficient.

for full implementation for the custom membership provider that solve this problem it will be published at MSDN Magazine late this month.


kick it on DotNetKicks.com
Posted by Adel Khalil with 1 comment(s)
Filed under: , , , ,

Live from MDC 07

Hi, guys posting live from MDC 07 and just finish the seconed session.... so far theres two sessions presented by TOP IT and New Horizon delivering an overview of .NET Framework 3.0 as the first session and the one just finished talked about SQL Server OLTP.

stay tuned...for these topics resources

Posted by Adel Khalil with 1 comment(s)
Filed under: , , ,