Friday, October 29, 2004

Security Web Site

I found a web site that is full of documents related to computer security

http://www.securitydocs.com/

Labels:

Thursday, October 28, 2004

Deploying Assembly/DLL in different folder for ASP.NET

Some time earlier, I blog about how to deploy assembly/DLL in subfolders of the main app folder for Winform application :
http://dataerror.blogspot.com/2004/10/deploy-net-assembly-in-different.html

Scott Hanselman posted the technique how to do the same for ASP.NET application.
http://www.hanselman.com/blog/PermaLink.aspx?guid=4d0ef4fb-f8ae-4355-a658-3c0432c98dbe

Labels:

Sunday, October 24, 2004

Bon Voyage, Sydney folks!

My relative and cousin from Sydney was in town last week to visit us. I took the whole week off to spend time with them and drive them around. The last time they came to KL was 6-7 years ago. At that time, there are no Mid Valley, no KLIA and not so many highway. How much things have change over these years.

Things that they have enjoy most I guess is shopping and local foods. I took them to Steven Corner at OUG for dinner and they were thrilled by the local mamak delights.

Now they have gone and I got to go back to work this week. Good times always flies.

Monday, October 18, 2004

Gen 2 is just another Proton Car :(

I went to see the new Proton Gen 2 yesterday with my friends.

The visit was pretty dissapointing though. Apart from the fact that the car body looks nicer and feel more solid, the interior and finishing is bad. If you have seen the quality of a Wira or Waja, the quality of Gen 2 is just along those line.

The utilization of space inside the car has not been optimum. The door lock and power window switch is located at the place that is unnatural for the passenger's hand to reach.

I have even heard of cases where the radiator was malfunction and blow up the car after 4 days on the road.

Why can't the Proton's guys produce a car that has the same quality bar as a a foreign car. In contrast, Korea who also started the automobile industry about the same time with us has improve so much and ways ahead of us.

Sigh!!

C# Edit and Continue

Folks at Microsoft announced that Edit and Continue will be available for C# in VS 2005. What a great news!

http://blogs.msdn.com/somasegar/archive/2004/10/15/242853.aspx

Labels:

Tuesday, October 12, 2004

Fast searh tool for Outlook

Found this little add-in for MS Outlook that can perform very fast and powerful search.

http://www.lookoutsoft.com/Lookout/

Saturday, October 09, 2004

VB.NET World Tour

Today we have a product manager and dev lead from Redmond to talk to us about VB.NET in our dev user group meeting this month. They stop by KL as part of their journey on the VB.NET World Tour.

During the 2 hours sessions, they run quick demo to show us what VB.NET is capable of as of Visual Studio.NET 2003. Then they move on to talk a little bit about what is coming out from the Visual Studio 2005 pipe.

There have been significance improvement in the VB.NET IDE like having more Winform controls, code snippet, edit and continue debugging and so on.

One of the feature enhancement that won most applause is they finally remove the 'TextBox1' default text when you drop a textbox onto the Winform designer. This enhancement alone can help improve the productivity so much. Think of how many textbox you put on every winform and how much time you spend on removing the default text. Although this feature is 10 years late(since VB3), but late is better than none at all.

Another significant improvement is in the IDE itself. The editor now behave much like a word processor now. For example, it show different color to indicate source code that has been saved and not saved, and it has capability to do certain spelling error correction.

Well, despite all these enhancements, I am still a loyal C-Sharper.

Monday, October 04, 2004

Deploy .Net Assembly in different folder

By default, the CLR will look for the assembly files(dll) in the same directory as the application(exe). If it cannot find the dll, a FileNotFound exception will be throw.

This might not be desirable if your application has a large number of dll that it reference. For example, if your application support plug-ins, you might want all the plug-ins to be put into another directory call 'plugin'.

There is 2 ways to deploy the dll into a different directory. However, this folder is relative to your application directory. You cannot deploy the dll outside your application directory.

Method 1
You can deploy the dll in a sub directory that has the same name as the dll.
For example:

You have 2 files, myapp.exe and mydll.dll. You deploy myapp.exe in your application folder, and deploy mydll.dll in a sub directory named 'mydll'.

It should look something like this :

\program files\MyGreatesApp\myapp.exe
\program files\MyGreatesApp\mydll\mydll.dll


Method 2
You can use a application configuration file to specify the private path the CLR
should search for to locate the dll.

For example, you place you exe and dll in the following directory :

\program files\MyGreatesApp\myapp.exe
\program files\MyGreatesApp\plugin\myplugin.dll

This is how your application configuration file should look like :

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="plugin"/>
</assemblyBinding>
</runtime>
</configuration>

If you have multiple directory, you can specify the all the directories using a semicolon delimited string. But take note that it cannot have any space in between the semicolon.

Example :

<probing privatePath="plugin;library"/>

Labels:

Sunday, October 03, 2004

Going to be a busy weekend.

Looking at my calendar, this coming weekend is going to be busy.

First, on Saturday morning, I got to attend a friend marriage registration at "Tian Hou Gong". In the same afternoon, got to run down to KLCC to attend a User Group meeting. I have been MIA from the meeting for the last 2 months. Hope to make it this month since there will be some Redmond folks coming.

On the following day, have to attend another friend wedding dinner. I found out some time ago my friend's wife's sister happen to be one of those friend that I know from the user group. What a coincident.

On Monday, there will be a kind of split-split situation. 2 things is going on, I either have to attend this friend actuall wedding ceremony or got to help out the other friend with his wedding photo taking session.

And after that, looking forward for my one week holiday. My aunt and cousin from Sydney will be coming for a week of visit.

Friday, October 01, 2004

SQL Server Identity column

The value of a identity column is always increased even after you remove all records in that table. Here are some tips how you can manipulate the seed value for identity column.

To remove all record in the table and reset the seed to its initial value, run :
TRUNCATE TABLE YourTableName

To find out seed info about the identity column, run :
DBCC CHECKIDENT (YourTableName, NORESEED)

To set the seed value to a particular value (Eg: The seed value is currently 25, so the next value to be insert into the column is 26, but you want to it to be 31), run :
DBCC CHECKIDENT (YourTableName, RESEED, 30)

Note : If you specify the new seed valus to N, the next value to be insert will be N + 1.

Labels:

Truncate SQL Server Database Log

Over time, the database log file can grow very large. In those cases, you might want to truncate the log to free up spaces. Here is how you can do it.

-- Truncate the log. It DOES NOT backup the log!!!
backup log testdb WITH NO_LOG

-- Shrink the log file
dbcc shrinkfile(database_logfile, truncateonly)

You can find out the name of your database log file by running the following stored proc:
EXEC sp_helpfile

After you truncate the log, the changes to the data are not recoverable. Make sure you always backup your database after truncating the log.

Labels: