Friday, April 30, 2010

Not relying on Visual Studio dbml creator and using SQLMetal

For VS 2008: I like to keep all the data structure in the database (foreign key relationships etc.) and do not have much use of defining them manually in the dbml generated by Visual Studio. So I generally use a bat file like to following to generate the dbml file from the database (sql server compact example):

"C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\SqlMetal.exe" ENDData.sdf /dbml:ENDData.dbml /serialization:unidirectional

This is for linq to SQL.

Now I use ADO.net entity framework so that I can use other non ms (free ;) ) databases. That has the update schema from database option which is cool.

Enjoy!

Thursday, April 22, 2010

What all to request when the server is bought by the client (customer)

Another project successfully completed! Hurray!

But it took longer than expected. I had to reconfigure it Five Times! Primarily due to power and firewall issues.

So here is a short list that I keep handy henceforth:
  • Hardware : Processor
  • Hardware : RAM
  • Hardware : Harddisk (+ backup space)
  • Software : Operating System
  • Software : Permanent administrator access on the machine
  • Location : Power Stays on all the time!
  • Location : All nodes you need access to should be accessible from the location. 
Also I like to do the following to the windows server:
  • Enable Remote Desktop
  • Disable "Error Reporting" from your computer's advanced properties (this can cause some console application to be stuck at a user prompt). In windows vista it is available under : gpedit.msc -> computer configuration -> Administrative Templates -> Windows Components -> Windows Error Reporting -> Disable Windows Error Reporting -> Enabled.
  • Disable the shutdown event tracker. This will prevent auto logon in case of power failures. gpedit.msc->computer management -> Computer Configuration -> Administrative Templates -> System -> Display Shutdown Even Tracker -> Disabled -> OK (http://support.microsoft.com/kb/293814)

I will update this list as I go on in life :)

Enjoy!
PS: VS2010 and Silverlight 4 is here ... can't wait to go back and take it for a spin!
UPDATE: love VS2010 :)

.NET Embedded database

SQLLite is awesome. And by far the one I trust most for stability.

However it cannot function over windows shares. This means that there really isn't much of a distributed system available.

So I was reviewing the "FREE" options. This came up:
http://en.wikipedia.org/wiki/Embedded_database

Will review the free ones with good .NET support.
These in particular:
ScimoreDB
EffiProz

Scrimore is highly respected (i knew that before).
But EffiProz is improving (previously i remember it's codeplex page http://effiproz.codeplex.com/ now its http://www.effiproz.com/Downloads.aspx . Doesn't mention beta on the new page)

Its is going to be about performance and how easy it is to change from embedded to client / server.

Monday, April 19, 2010

WPF and WCF RIA Services

RIA services is not just for silverlight. Someone asked me this after watching the Siliverlight 4 keynote.

Below is a WPF sample application:
http://code.msdn.microsoft.com/RiaServices/Release/ProjectReleases.aspx?ReleaseId=3587
Title: 'Add Service Reference' to a Domain Service

Update : 20th September 2011 : The wpf sample link no longer works and I cannot find the updated link. Check out http://blogs.msdn.com/b/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx for a sample of winforms. Effectively the same thing :)

Enjoy!

Sunday, April 18, 2010

ASP.net Embedded web servers

Free:
http://code.google.com/p/aspnetserve/
http://www.asp.net/downloads/archived-v1.1/cassini/

Not free:
http://www.asp.net/downloads/archived-v1.1/cassini/

You can host wcf (giving built in librarires in .NET) but silverlight + wcf  is what I need. Haven't tested any for this ... yet!

Enjoy!

Wednesday, April 14, 2010

My favorite feature of WPF 4 (yet)

I simply love that they added cached composition!
http://weblogs.asp.net/scottgu/archive/2009/10/26/wpf-4-vs-2010-and-net-4-0-series.aspx

The sole purpose of WPF : GUI
And this alone will make my GUI's SO much faster.
I knew something this cool was going to happen ... That's why I moved to WPF in the first place.
Thanks Microsoft!

Friday, April 9, 2010

Using WCF service with Windows XP SP2 and Windows Server 2003

All previous installations of wcf I had done to date were on windows 7 and windows vista. Had to do one on windows server 2003. Read http://msdn.microsoft.com/en-us/library/aa751792.aspx . Here's how I did it:

Note: Step 3 is only required since I installed IIS (from manager server -> add a new role) after installing .net 3.5 sp1

open visual studio cmd (required for step 3)


  1. cd "c:\windows\Microsoft.net\framework\v3.0\Windows Communication Foundation"
  2. ServiceModelReg.exe /a /x
  3. aspnet_regiis -ir

Enjoy!