Screencast: .net 4.0 Named and Optional parameters

Since I installed Visual Studio 2010 Beta 2, I’m no investigating all the new features of .NET 4.0. I did a short video on the new named and optional parameters. The quality of the video is not fantastic, sorry for that. If you got any tips on proper encoding and better places where I can host the videos. Please let me know.

Hopefully you’ll like it.

Getting started with Visual Studio 2010 and TFS2010

A new year is just around the corner and it’s also time to start working with Visual Studio 2010, Team Foundation Server 2010 and .NET4.0. It’s packed full with new and cool features. Maybe I’ll even do some posts on these new features.

But how can you get started? Well that’s not too difficult. Microsoft has given us a lot of new VPC images for Christmas. Check out the list

Visual Studio 2010 Beta 2 and TFS2010 (Hyper-V)

Visual Studio 2010 Beta 2 and TFS2010 (Windows [7] Virtual PC)

Visual Studio 2010 Beta 2 and TFS2010 (Virtual PC 2007 SP1)

Want to start setting up an image yourself and just want to have the ISOs of Visual Studio 2010 Beta 2 and Team Foundatsion Server 2010 Beta 2? No problem, Microsoft also released these bits on the Microsoft Download site:

Microsoft Visual Studio 2010 Premium Beta 2

Microsoft Visual Studio 2010 Professional Beta 2

Microsoft Visual Studio 2010 Ultimate Beta 2

Microsoft Visual Studio Team Foundation Server 2010 Beta 2 (Some help is also provided: Team Foundation Installation Guide 2010)

Once everything is set up and installed, you probably want to start immediately trying out this new IDE, right? Check out this cool training kit full of demo’s, videos, hands on labs Visual Studio 2010 and .NET Framework 4 Training Kit

Retrieve IP and Port number of remote endpoint request sender

I wanted to track which IP addresses were sending requests to my WCF service. So I did some investigation and apparently it’s not so hard to retrieve this data. The RemoteEndpointMessageProperty class makes the client IP address and port number associated with the remote endpoint from which a message was sent available. Underneath is a snippet of code that will show how it works.

   1: public string TrackIP()
   2: {
   3:     OperationContext oc = OperationContext.Current;
   4:     MessageProperties mp = oc.IncomingMessageProperties;
   5:     RemoteEndpointMessageProperty remp = mp[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty;
   6:  
   7:     return string.Format("Request sent from {0} and port is {1}", remp.Address, remp.Port);
   8: }