Jeff W. Barnes

Ramblings on C#, WCF, and random .NET

October 2006 - Posts

Code Camp Slides and Code

I have uploaded the code and slides from my presentations at the Alabama Code Camp on Saturday.  Here are the links:

Introduction to Windows Communication Foundation
Leveraging WCF to Build Reliable, Transacted, and Scalable Distributed Systems

For those that were interested in the list of additional WCF resources, here are the direct links to save you from having to download the slides.

Another Successful Code Camp

Once again, the Alabama Code Camp has come and gone.  The third edition of this event went pretty well.  I have not heard the official count, but attendance was probably somewhere in the range of 150.  There were a variety of sessions and most of the people seemed to enjoy themselves. 

The inaugural run of .NET University also went very well.  I am sure the lure of a free t-shirt and certificate of completion was somewhat of a factor, but there seemed to be around 30 people that completed the entire introductory track of .NET Framework 3.0.  I was very pleased with my Intro to WCF session.  There was great interaction and feedback from the attendees.

It has already been mentioned that the fourth edition of the code camp will be held in Mobile.  Although it is way too premature for an actual date to be announced, I am guessing it will be during the timeframe of March to April 2007.  Also, there will be another run of the .NET University held within the Birmingham, AL area.  The date is not locked down as of yet, but it will likely be during early December.  Most of the same speakers from code camp will be presenting.

I will have the code and slides from my presentations posted sometime tomorrow.

.NET University at Alabama Code Camp

I have received word from Doug Turnure that it has been decided to formally kick off .NET University at the Alabama Code Camp this weekend in Montgomery.  .NET University is simply a community effort to provide a good technical overview of the upcoming .NET Framework 3.0 (formerly known as WinFX).  It is completely free of charge. 

Here is how it will work:

An introductory session will be presented for each pillar of technology within the .NET Framework 3.0.  This includes Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), Windows Workflow (WF), and CardSpace.  Everyone that registers for .NET University and attends each of the introductory sessions will receive a free t-shirt as well as a certificate of completion.

I will be presenting the session for the introduction to WCF.

If you aren't familiar with these technologies and want to get an idea of their potential, this will be an excellent opportunity to do so...especially since the release of .NET 3.0 is quickly approaching.  And remember...it doesn't cost you a penny to attend!

All of those planning to attend Code Camp and want to participate in the .NET University program can register here.  If you want to receive the t-shirt and certificate, you must register separately for .NET University (in addition to the Code Camp registration).  I have been told that it will be possible to register at the same time you check-in for Code Camp.  However, it would significantly expedite the process if you take a moment to register in advance.  I am not sure whether a registration limit will be imposed, but it wouldn't surprise me due to restrictions on seating capactiy.  To be on the safe side, register now if you definitely plan on attending.

Please note this is completely optional for Code Camp attendees.  You are not required to participate in .NET University in order to attend the Code Camp.  There will be numerous sessions running all day on a variety of topics.  If you aren't interested in .NET 3.0, I am sure you will find something else to catch your attention.

See you at the camp!

Code Camp Presentation Change

The third edition of the Alabama Code Camp is coming up next weekend on Saturday, October 28th in Montgomery, AL.  I originally submitted two presentations for the event: Introduction to Windows Communication Foundation as well as Extensibility in Windows Communication Foundation

However, after getting into the preparation of the extensibility presentation, I have decided that it is really too broad of a subject area.  Instead of providing a high-level overview of the major extensibility points, I would rather narrow it down to allow sufficient time for getting into some of the details.  Consequently, I have decided to change the presentation to "Leveraging WCF to Build Reliable, Transacted, and Scalable Distributed Systems."

This presentation will be build upon the introductory session by taking a closer look at some of capabilities of WCF that will be most commonly used in the development of distributed systems.  It will cover reliable sessions, distributed transactions, and queues.

I hope to see you there.

WCF Channels Documentation

This is another post that doesn't really present brand, spanking new information.  However, there seems to be quite a few people that don't know about it. 

For those interested in learning about the details of the WCF channel model, there is a free mini-book available on the WCF community site that is a great starting place.  Although it was originally written based on the earlier bits of WCF, it continues to be an excellent resource.  The mini-book contains eight chapters that provide a detailed look at both the channel model and how to build custom channels.  It will likely be of particular interest for developers that are extending the WCF channel stack.

You can access the mini-book here: http://wcf.netfx3.com/files/folders/product_team/entry3550.aspx

Enjoy!

Posted: Oct 17 2006, 04:30 PM by jeff.barnes | with no comments
Filed under:
Metadata Exchange Endpoint

This has probably been covered elsewhere, but I am going to post it anyway.

The Metadata Exchange Endpoint (MEX) is a special endpoint in WCF that exposes metadata used to describe a service.  In previous releases of WCF, the MEX was implicitly added to all services.  However, due to security reasons, it is no longer exposed by default as of RC1.  Without the MEX, you will not be able to use svcutil.exe to automatically generate a proxy class.  Fortunately, it is a simply process to enable the MEX for your service.

The MEX can be exposed programatically or via configuration (just like any other endpoint).

To programatically expose the MEX:

using System.ServiceModel;
using System.ServiceModel.Description;

ServiceMetadataBehavior behavior = new ServiceMetadataBehavior();
behavior.HttpGetEnabled = true;
host.Description.Behaviors.Add(behavior);

host.AddServiceEndpoint(
    typeof(IMetadataExchange),
    MetadataExchangeBindings.CreateMexHttpBinding(),
    "http://localhost/MyService/mex/");

Please note that ServiceMetadataBehavior, IMetadataExchange, and MetadataExchangeBindings reside within the System.ServiceModel.Description namespace.  This threw me off when I was first searching for them.

To expose the MEX via configuration:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <services>   
      <service name="MyService" 
               behaviorConfiguration="DefaultBehavior">
        <endpoint address=http://localhost/MyService
                  binding="basicHttpBinding" 
                  contract="IMyService" />
        <endpoint address="http://localhost/MyService/mex"
                  binding="mexHttpBinding" 
                  contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="DefaultBehavior">
          <serviceMetadata httpGetEnabled="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>

Depending upon your binding, the corresponding MEX binding will vary. There is support for HTTP, TCP, and Named Pipes.  If you are adding the MEX programatically, there are corresponding methods in the MetadataExchangeBindings object.  If you adding the MEX via configuration, the equivalent binding is fairly obvious to figure out.  Essentially, use mex?Binding and replace the ? with whatever you are using.

It should be noted that you are not required to enable HttpGet.  SvcUtil will still be able to access the MEX without it.  However, it is useful if you want to view the WSDL from a browser by going to the address of the service.  You cannot do so without enabling the HttpGet.

Posted: Oct 16 2006, 03:43 PM by jeff.barnes | with 1 comment(s)
Filed under:
Free Microsoft eLearning Clinics for .NET 3.0

I am not sure how long it will be available, but Microsoft is currently offering a free eLearning clinic for .NET Framework 3.0 technologies. This includes a separate clinic for WPF, WCF, and WF.  I haven’t reviewed them yet, but it appears to provide some decent introductory information based on the overview.  If you are interested in one or more of these topics, it might be useful to you.

Just go to the link below, add the item to your cart, and check out.  There is no payment required since the item is free.

You can access the information here: https://www.microsoftelearning.com/eLearning/offerDetail.aspx?offerPriceId=109340

Posted: Oct 11 2006, 03:28 PM by jeff.barnes | with no comments
Filed under: , , ,


Disclaimer:The opinions and views expressed within this blog are solely my own and do not represent those of my employer or anyone else.