Codeplex has been updated

October 11, 2007 at 2:59 pm (.net)

Yesterday I was surfing around a bit and went to the codeplex.com site. I noticed that they had given it a new look. I really like this new look. The old one wasn’t very user-friendly if you ask me. I especially hated to way you had to browse for projects. The new way of search results is much more appealing to the eye

Permalink No Comments

VoIP As You Are

September 3, 2007 at 1:31 pm (Uncategorized)

A nice commercial for the Microsoft Office Communications Server 2007: 

VoIP As You Are

Permalink No Comments

XAML and WPF Coding Guidelines

August 28, 2007 at 9:59 am (Uncategorized)

I was looking around for some coding guidelines (.net in general) and I found the following for xaml and wpf by paul stovell. It’s a nice compilation of guidelines. Would be nice though to have it in a pdf form so I can add it to my collection ;-) 

PaulStovell.NET » XAML and WPF Coding Guidelines

Permalink No Comments

Great video about Silverlight

August 24, 2007 at 7:58 pm (Uncategorized)

I had some free time on my hands at home and I was looking for some information about SilverLight. This session demonstrates building a rich interactive application using Silverlight. We cover how to use Microsoft Visual Studio to create applications, how to create UI using XAML markup and code, how to build a custom control, how to retrieve data from a Web service, and how to manipulate data with XML and LINQ.

This video is about the following features:

  • Http Networking + XML
  • Web Services
  • LINQ
  • HTML Integration
  • Mac Debugging (really nice one !!!)

Video downloads:
WMV | Zune | iPod | PSP | MPEG-4 | 3GP

Or go to the original page @ http://silverlight.net/Learn/learnvideo.aspx?video=144

Permalink No Comments

Installing Infragistics NetAdvantage 2006 volume 3 on vista

August 20, 2007 at 8:08 am (Uncategorized)

For those of you that tried it might have noticed some error saying:

“Cannot find %sysdrive%\inetpub\wwwroot” 

You can solve this problem by changing a registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp

Change the value from: %systemdrive%\inetpub\wwwroot
to: c:\inetpub\wwwroot

and your installation will work. At least mine did ;-)

Permalink 1 Comment

Easy way to setup SSL for testing on IIS

August 17, 2007 at 5:20 pm (Uncategorized)

If you want to test SSL on IIS 6.0 you need to go through the hassle of creating a certificate and configuring IIS to allow SSL connections.

You can avoid all this with a simple execution of a small program called SelfSSL. SelfSSL is a program that creates and installs a local certificate and configures IIS for SSL.

Here are the steps to follow:

  1. Download the IIS 6.0 Resource toolkit from Microsoft MSDN Downloads.
  2. Install the toolkit.
  3. Open a command prompt (Start -> Run -> cmd -> [ENTER])
  4. Go to the following path: C:\Program Files\IIS Resources\SelfSSL
  5. Execute the program SelfSSL with the following command: SelfSSL.exe /T
    The /T option adds the self-signed certificate to “Trusted Certificates”
    list. The local browser will trust the self-signed certificate
    if this flag is specified.

Happy SSL-ing ;-)

Permalink 1 Comment

Update your feeds

August 6, 2007 at 1:05 pm (Blog)

Just a small reminder to update your feed subscription to this blog if you have any. I changed hosting for the blog so the feed url is different as well.

greetings

Permalink No Comments

Babysteps: LINQ To SQL

August 3, 2007 at 5:28 pm (.net 3.5, LINQ, Visual Studio .Net "Orcas")

Okay I had some free time to spend on LINQ  To SQL and because I’m working on a new personal project for the future (God only knows if I’ll ever finish it ;-) ). I need in my database a table “Countries”. Because I don’t want to create a script to load this table  and I certainly don’t want to fill it manually I started looking for a web service that could provide me the data I need. I want to keep the country’s Name and its ISO code.
For this I found a web service on http://www.oorsprong.org [WSDL] which does exactly what I need.

The web service has got a web method - ListOfCountryNamesByCode - that returns all the countries with their ISO codes. Just perfect! :-D

Knowing where to get the data, we need to create the table that holds the data I’m getting from the web service. For this I only need a very basic table:

CREATE TABLE

[dbo].[Countries]
(
[ID] [int]
NOT NULL IDENTITY(1, 1),
[ISO] [nvarchar] (3)
NULL,
[Name] [nvarchar] (50)
NULL,
[InsertDate] [datetime]
NULL
) ON [PRIMARY]

Okay I admit maybe it’s not the best table structure ever, but it will do the trick.

So now the table is ready to store the data gotten from the web service all we need is to get the data.

First thing you need is to add a LINQ To SQL Mapping file (dbml file). Doing this is very simple. Just click somewhere in the solution explorer’s related project and select “Add new item”.

add new item - LINQ to SQL

 From the list you can select LINQ To SQL Classes. When the dbml file is created you just drag-n-drop the tables from the server explorer onto the designer’s surface.

dbml designer

That’s all you need to do for the object relational mapping for the Countries table. Also notice that when you drop the Countries table onto the surface of the designer it is smart enough to rename the autogenerated object to Country because it will represent the Country entity that is stored in the Countries table.

Next you need to fetch the countries using the web service. So just add a web service reference to your project, create an instance and call the necessary method, in this case it’s the ListOfCountryNamesByCode which will return an array of tCountryCodeAndName instances.

org.oorsprong.webservices.CountryInfoService serv =    new org.oorsprong.webservices.CountryInfoService();
org.oorsprong.webservices.tCountryCodeAndName[] countries =    serv.ListOfCountryNamesByCode();

To work with the generated Country entity you will first need to create a database context. The designer already generated all the necessary code for you. All you need to do is create an instance like this:

CountryTableDataContext db = new CountryTableDataContext();

Be honest it couldn’t be much easier ;-)

The instace db contains a property called Countries which is a Linq table for Country entities. Because we have a type difference from what is returned by the web service and what needs to get stored in the database we will convert the array of tCountryCodeAndName instances to an IEnumerable of Country entities. For this we can use the LINQ to Objects technology together with anonymous typing and object initialization expressions.

 var ctr = from c in countries
           select new Country() { ISO = c.sISOCode,            Name = c.sName, InsertDate = DateTime.Now };

As you can see we don’t define the type of ctr it will be implicitly defined as whatever is returned from the LINQ query. The part after the equals sign is the same as writing a foreach statement.
The second part of the code is where we create a new Country instance and assign it’s values using object initialization expressions. For example the Country entity has got an ISO property so you can say ” new Country() { ISO = c.sISOCode} ” to assign it the value of the property sISOCode on the tCountryNameAndCode instance c.

In C# 2.0 the previous code would look like this:

 List<Country> countryList = new List<Country>();
  foreach (tCountryCodeAndName c in countries)
  {
      Country ctr = new Country();
      ctr.ISO = c.sISOCode;
      ctr.Name = c.sName;
      ctr.InsertDate = DateTime.Now();

      countryList.Add(ctr);
  }

Of course there are some other techniques in the new way of coding that I didn’t explain like local type inference, lambda expression (behind the scenes)…

Now that we have got an IEnumerable of Country entities “ctr” we can add them to the database context very easily:

db.Countries.AddAll(ctr);

That’s it, just do this last line of code below and all the countries with their respective ISO code will be stored nicely in the database. Isn’t that cool ?!?

db.SubmitChanges();

If you have any questions on this post you can use the comment option to contact me about this.

Permalink 2 Comments

Download alternative for Visual Studio .Net 2008 beta 2

July 26, 2007 at 11:03 pm (Visual Studio .Net "Orcas", Visual Studio .Net 2008, msdn)

Most of you know the problem with downloading big files from the microsoft site. at least I do. Most of the time it’s not very fast and downloads also get interrupted frequently. I’m not saying this only due to the microsoft site so don’t get me wrong here ;-)
Now microsoft is testing a new piece of software (still in ctp) called Microsoft Secure Content Downloader:

The Microsoft Secure Content Downloader (MSCD) is a peer-assisted download manager capable of securely downloading specific files. MSCD is intended for consumers who are downloading from a home PC, or business users whose computers are not behind a corporate firewall. If you use MSCD from behind a corporate firewall, you may be unable to download content, and may adversely affect other clients’ ability to download content.
Main features of the MSCD are:

  • Secure content description
    • Each file available for download has a secure description, ensuring the content you download is exactly what the publisher published.
  • Scalable performance
    • MCSD is a peer-assisted technology. Each client downloads content by exchanging parts of the file they?re interested in with other clients, in addition to downloading parts from the server.
      • No matter how great the internet?s demand for the file, you will always be able to make progress downloading.
      • MSCD lets you download content more quickly than possible without peer assistance.

Permalink 1 Comment

Learn for free and put your ipod to good use

July 26, 2007 at 7:02 am (General)

Today I decided to browse the Itunes store again to see if they already are offering tv series in europe. I didn’t find what I was looking for, but what I did find was something called iTunes U.

The “U” stands for University. What this feature allows you to do is to download lectures from various universities like:

- Arizona State University
- Bowdoin College
- Concordia Seminary
- Duke
- Michigan Tech University
- MIT
- NJIT
- Otis College of Art and Design
- Pennsylvania State University
- Queen’s University
- Seattle Pacific University
- Stanford
- Texas A&M University
- UC Berkeley
- UMBC
- University of South Florida

So this means you can download lectures of various topics. For example I’ve downloaded 2 topic’s lectures from MIT:
- Introduction to Algorithms, Fall 2005
- Introduction to Copyright Law, January 2006

The first topic is about 24 lectures of audio material while the second topics is about 4 or 5 lectures but in video material. This is really nice you can actually follow the class given by the professor on your ipod. I’m not sure if they are interesting, but I spend a lot of time underway on the train and car, so I might as well try to learn some new things. :-)

Permalink No Comments

« Previous entries · Next entries »