Codeproject Highlight

Do you want to be informed the best stuffs of Codeproject every months? I have one good news for you. I’m gonna launch one new program called “Codeproject Highlight” started from this month in my blog. In this program, there will be there parts such as news, the best articles and the best posts in CP forum (mostly are from ASP.NET, Web development and C#. ).

The main reason why I start this program is that it saves your time for reading all of latest articles from CP’s feed and tracking all questions and answers from Codeproject forum.

News

Site Upgrading

The whole Codeproject site has been upgraded from Classic ASP to ASP.NET version with a lot of improvements . This is really big changes which is done during 8 years of running. As this site has really huge amount of traffic, it’s very hard for them to upgrade this site with new version. However, the CP development team has done the great job to upgrade the whole site successfully. Congratulation! CP team

Chris shared a few interesting things here ~

For those interested here are some whacky and amusing things we found:

  • SQL Server, IIS and the ASP.NET framework are possessed.
  • Using development settings instead of production settings is a Bad Thing.
  • Storing session state in a SQL database can be a performance killer. Especially when the database is an old P4 test harness machine 40 km away from the webserver. That was an interesting experience in scream therapy.
  • Always check your indexes. Especially the ones that absolutely positively are not and cannot be fragmented. They will be the ones most in need of attention.
  • 20,000 users hitting your application is wonderful load testing. We did load test but our testing machines did not generate the load you guys can generate
  • no matter how many ways you check code there’s always an angle that you haven’t looked at. We’re finding errors in 10 mins of being on that we couldn’t find from 3 months of beta testing. This is just nature.

The Best Articles

  • Silverlight 1.1 Fun and Games by Sacha Barber

    Silverlight Game and Fun

    Sourcecode : Download Source

    Note: This is an award-winning article of Visual Studio 2008 Competition.

  • Silverlight Alien Sokoban by Daniel Vaughan

    A fun Silverlight implementation of the game Sokoban. Contrasting Silverlight 1.1 and WPF, while showcasing some new features of C# 3.0, Expression Design, Expression Blend, and Visual Studio 2008.

    Silverlight Alien Sokoban

    Sourcecode : Download Source

  • Build Google IG-like Ajax Start Page by Omar Al Zabir

    Build a start page similar to Google IG in 7 nights using ASP.Net Ajax, .NET 3.0, Linq, DLinq and XLinq.

    Google IG

    Sourcecode : Download Source

    Demo : Ajax Web Portal

  • WCF / WPF Chat Application by Sacha Barber

    How to create a peer-to-peer chat application using Windows Communication Foundation

    Free Chatting Client in .NET

    Sourcecode : Download Source

  • ASP.NET Popup Control by Tomas Petricek

    Highly customizable JavaScript popup control for web page wrapped in ASP.NET custom control.

    ASP.NET Popup Control

    Sourcecode : Download Source

Links

The best posts in Codeproject forum

  • How to store the password in Database? Encrypting Vs Hashing, Salt

    This is a discussion about storing the password in database. As the user authentication used to be a part of almost every software system, the developers should have good understanding about how to store the password in database. We have discussed about encrypting vs hashing, adding salt or adding the user name after the password and etc.

    Summary

    • Don’t use encryption/decryption for password.
    • Don’t need to append the user name to the password.
    • Hashing the password with random salt (SHA2 might be the best for hashing.)

    You can read about it in the link below.

    Read More ~ guidelines on password encryption

  • Does the System.Deployment namespace cover a great deal of scenarios?

    I have been asked this question regarding ClickOnce deployment in CP forum. As I’m using ClickOnce APIs on SCSF (Smart Client Software Factory) project, I found a few missing things in System.Deployment namespace. The following are the things that ClickOnce can’t handle.

    Summary

    • No way to get the list of latest modules
    • The version of the whole application need to be updated if we wanna update just one module
    • ClickOnce doesn’t care about the version of assemblies.
    • DownloadFileGroup (“”) works only if “optional” is checked. There is no way to download the group of file by force

    Read More ~ An application that will get the updates from server automatically

  • ADODB.DataTypeEnum.adBigInt problem “Bad variable type!” in Windows 2000

    One people who are using ADODB in .NET asked the question below in our CP forum.

    The identity field of one of my SQL DB tables is a bigint, using ADODB to query the DB based on this bigint works fine in my XP machine, but gives me a “Bad variable type” error when I use my app in a W2000 machine.

    The W2000 machine has every service pack issued by MS, what could be the problem?

    Something works fine on XP doesn’t work on Windows 200 is very strange issue. As I never use ADODB (something that we used for VB6 projects in old days ) in .NET, I don’t have that experiences. The possibilities that I think of at that time did solve his problem.

    The trick is that casting the original datatype (long datatype in his case) to double datatype. :) Honestly, I’m not so sure why we need to do this but it did solve the problem.

    Cmd.Parameters.Append(Cmd.CreateParameter("TransId", ADODB.DataTypeEnum.adBigInt, 1, , CType(iTransId, Double)))
    

    Read More ~ In XP works fine, W2000: Bad variable type!

Okay. That’s all for now. This is just a taste of new thing in my blog. What do you think? Is it interesting? As this program is just started, your feedback is highly appreciated. I think that there are a few area that I can’t add in this post. Based on the feedback from all of you, I will make this program better and interesting.. If you like it, don’t forget to subscribe my feed ( http://michaelsync.net/feed ).

Thanks.

CAB Problem – “Smart Client Development May 2007″ template doesn’t show in Guidance Packages

One of my friend asked me that she was not able to find “Smart Client Development May 2007” template in Visual Studio 2005 – New Project Dialog. Then, I was looking for the solution and I got the solution as below. I hope it would be useful for those who are new to Smart Client Development.

Normally, the SCSF template should be shown as the following screenshot in Project Template dialog.

Project Template

But that template doesn’t show in template dialog then you have to follow the steps mentioning below to figure out the problem.

  • You have to check whether you have installed the corrected version of required software for SCSF (Smart Client Software Factory). In order to check what the required software are, click “Smart Client Software Factory – May 2007.msi”
  • Click “Check dependencis” button when the installer is loaded.
  • Checklist should be shown as picture below.

Smart Client Software Factory Installatin Checklist

  • All icons should be green icon. If not, you have to download the latest version of each setup files. and Install them in your machine before installing SCSF.
  • If you have installed the earlier version of those installers, I would recommend you to uninstall first. Note that you have to uninstall “Enterprise Library” before uninstalling Guidances Toolkit and Extension.
  • After uninstalling the old version, you can start installing the new version. Then check “check dependencies” which I mentioned in Step 1.
  • If it’s done, you should go to “Custom Setup”. Ensure that all checked boxes are checked as below.

Custom Setup

  • Then, Click “Next” to install.
  • After then, open Visual Studio 2005. Check the SCSF template in “New Project” dialog. (I hope you will get the template that you want. :) )

That’s all.. Hope it would help. Don’t hesitate to contact me if you have any problem. Thanks.

CompositeUI Application Block (CAB) Installation Problem on Windows Vista

Question : Are you getting the following errors while you are installing CAB (CompositeUI Application Block) on your Vista box?

CAB Installation Fucking Problem on Windows Vista Home Premier

CAB Installation Problem on Windows Vista Home Premier

Here is the Solution for you.

The shortest answer is “turn off UAC before installing CAB”.

Please read the following if you dont know how to do it.

  • Go to “Control Panel”

control-panel-window-vista.png

  • Go to “User Accounts and Family Safely”

User Accounts and Family Safely

  • Click “User Accounts” as picture below

user-account.jpg

  • Click “Turn User Account Control (UAC) on or off”

turn-user-account-control-on-or-off.jpg

  • Uncheck “Use User Account Control (UAC) to help protect your computer” and Click “OK” button

turn-off-uac.jpg
Then you may start to install CAB framework in your Windows Vista. I hope it would help. Feel free to let me know if you have any problem. I have tested this instructions on my Windows Vista Premier Edition. It works great.. Dont forget to turn on UAC once done.