:: thoughts on team system and more RSS 2.0
# Sunday, September 04, 2005

After reading the Pallmann Indigo book I was a bit confused about how to use proxy objects, where the book stated the importance of calling .Close before disposing a proxy object. The standard principle for implementing the .Dispose pattern is to let the .Dispose method close all resources the object has open. If the class implements a behavior where it is possible to close and reopen it (like for instance a database connection) then .Dispose should do a graceful shutdown. Apparently in Indigo WCF this is not the case. Calling .Dispose without first closing the proxy will not perform a graceful shutdown (where buffers are flushed etc). It is therefore necessary to make the extra call to .Close before disposing the object.

The correct code to create, use and dispose a WCF object looks like this:

using (MyServiceProxy proxy = new MyServiceFrontProxy())
{
   result = proxy.DoStuff();
   proxy.Close();
}

Kenny Wolf has a good explanation of the details in the communication object life cycle.

It should be noted that this is the situation as of WinFX beta 1 and the behavior has been discussed to be revised for beta 2. Let's hope they decide that calling .Dispose is enough!

Sunday, September 04, 2005 8:27:51 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
WCF (Indigo)
# Friday, August 19, 2005

Yesterday I did a presentation on WCF (Indigo) for the Swedish .NET User Group, SWENUG, in Gothenburg. As promised, here are the presentation and sample application I used:

PowerPoint presentation (1,56 MB)
OrderSample.zip (38,92 KB)

Friday, August 19, 2005 6:43:22 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
WCF (Indigo)
# Tuesday, August 09, 2005

This is the first part in a series of small exercises where I try out the diagnostics features in WCF (Indigo). The articles will cover the Logging, Tracing, Performance Counters and WMI features in WCF.

 

First out is logging. Logging is controlled by using the configuration file for the application. By default all logging is turned off but it can be enabled individually for transport level-, service level- and malformed messages.

 

The following is an example that enables all message logging:

 

<diagnostics>

      <messageLogging

            filterTransportMessages="false"

            logEntireMessage="true"

            logMessagesAtTransportLevel="true"

            logMessagesAtServiceLevel="true"

            logMalformedMessages="true"

            maxMessagesToLog="100"

            maxNumberOfFilters="20"

            maxSizeOfMessageToLog="1000000"

      />

</diagnostics>

 

The highlighted attributes are the key attributes to enable the logging feature. logEntireMessage is set to true in order to have the whole message logged. The default is to only log the message header. The next three entries enable logging at the various levels. Depending on the binding used (and its configuration) there may be quite a few messages logged for each invoked operation. Since WCE logs all messages processed that may include messages things such as policy and security negotiation. It would be interesting to see complete flows of what is happening during the client-server interactions, but that is a different story...

 

The log files written are named like this:

 

   PID(AppDomainName)_Ticks_MsgIndex.xml

 

By default log files are written using a default trace listener, which will write the files at the following location:

 

   %windir%\system32\Logfiles\Messages

 

If another location should be used then a trace listener must be added in the "system.diagnostics" section in the configuration file for the source name “IndigoMessageLogTraceSource”.

 

The configuration below will write log files to a specified point using the provided MessageWriterTraceListener class:

 

<system.diagnostics>

   <sources>

      <source name="IndigoMessageLogTraceSource"

                   switchValue="Verbose">

         <listeners>

            <add name="multifile" type="System.ServiceModel.Diagnostics.MessageWriterTraceListener, System.ServiceModel, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

                     initializeData="c:\logs\messages" 

                     maxDiskSpace="1000" />

         </listeners>

      </source>

   </sources>

</system.diagnostics>

 

The highlighted attribute sets the directory used for the message logging, in this case c:\logs\messages.

 

Unfortunately it seems like it is only possible to set the diagnostics configuration before the service is started. If the configuration is changed while the application is running it has no impact. This is of course a limitation that is going to be hard to deal with in a production environment. Hopefully there will be some more work done in this area before the v.1 release of WCF comes out the door.

Tuesday, August 09, 2005 10:12:11 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [1] -
WCF (Indigo)
# Tuesday, August 02, 2005

I've finally finished reading the Indigo book by David Pallmann. In summary a good introduction piece and the book really helps to fill some of the gaps I got from just reading the SDK and playing with the samples. The book could have more in-depth details instead of the sometimes lengthy listings of properties.

I liked the way the author mixed text with examples. The walk-through exercise in each chapter felt effective as well, but may not be that useful to someone that has more than a basic understanding of Indigo (and has worked with the SDK samples). Perhaps it is possible to make the samples a bit less verbose (refactoring, please).

Chapters 1-2 are good intros. Not much more than the SDK docs but a good start.

Chapters 3-7 and 9 are really good and in themselves worth buying the book for. Goes through the programming model, contract, client and server programming etc.

Chapter 8 on security: I was expecting more of this chapter. It goes trough the basics well enough but I had hoped for more examples on how to implement security solutions (certificate management, role based security etc).

Chapter 10 on hosting was a bit thin, but I realize that there isn’t that much more to say about hosting. Since you’ve dealt with configuration earlier what is left is only the different hosting mechanisms. With IIS7 I guess there will be more options. Maybe a couple of more lines on how “RunOnUIThread=true” affects Windows clients could be useful so that the reader understands why this is important.

The final chapters on management, deployment and troubleshooting are also good but definatly on the short side. Could perhaps be joined to one chapter? 

In the end there are a couple of case-studies, which is nice as a complement to the shorter samples in the SDK.

Why were the appendices not included in the book? They must are short enough to be in the book, aren’t they?

For IIS hosting, the .svc files doesn’t have to include the Language tag. It may seem a bit confusing since the services are implemented in separate assemblies.

The proxy close/dispose recommendations in the book are a bit vague and sometimes the examples are a bit misleading. I think the book could benefit from a clear discussion (in a sidebar or so) about the using/close/dispose principle for the Indigo proxies. But I also understand that this is a feature that is being reviewed for beta 2 so maybe the outcome of that will be totally different.

The samples and exercises works well as a complement to the chapter text. They could perhaps be re-factored to be a bit more concise (some examples are very verbose which almost makes it difficult to keep the thread) and the structure is very similar between chapters. For good and bad...

The book unfortunately has a number of annoying errors. Most of them are small but it kept me having to switch between the book, the SDK and the infamous Reflector to be sure I understood each concept correctly. I need to be sure that the content in a book is accurate and usually MS Press books have very few errors in them. But of course this is a beta book that needed to come out early.

To sum up - a good first book on Indigo and definately worth reading. Go get it! http://www.microsoft.com/MSPress/books/7703.asp

Tuesday, August 02, 2005 9:03:26 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Indigo
# Thursday, July 28, 2005

Indigo is now just a memory... Windows Communication Foundation is the new name for the upcoming communication stack!

The newly released beta 1 of WinFX can be downloaded here and the SDK can be found here. Note: WinFX beta 1 SDK requires Visual Studio 2005 beta 2. Read the release notes here for more info on existing issues.

Thursday, July 28, 2005 8:35:30 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Indigo
# Monday, July 25, 2005
Roman Kiss has written an article on how to use WS-Transfer from an Indigo application. The article has a complete sample based on the Indigo Beta 1 RC1 release. Read the article at http://www.codeproject.com/useritems/WSTransfer.asp.
Monday, July 25, 2005 8:29:51 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Indigo
# Thursday, July 21, 2005

Pierre Greborio has written an add-in for Visual Studio 2005 that will generate the proxy code for an Indigo service similar to the "Add web reference" function in VS. The add-in is a wrapper for some of the commands to svcutil.exe but it allows us to stay inside Visual Studio while we work. The add-in is posted at http://weblogs.asp.net/pgreborio/archive/2005/06/07/410662.aspx.

Update: now the add-in has been posted as a "GotDotNet" workspace, http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=2b95225a-5c43-4246-bea3-d2315aae6da8.

Thursday, July 21, 2005 10:19:16 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Indigo

Finally Microsoft has put together a Virtual PC image with the whole Visual Studio 2005 Team System server. Even though the process is much improved in the latest releases it still takes a while to get all things in order. So thanks for putting this image up on MSDN!

Here's part of the release notes stating the content of the image and the run-time requirements:

VPC Contents
-------------
o       Microsoft Windows Server 2003 Standard Edition (expires September 16, 2006)
o       Microsoft Visual Studio 2005 Team Suite Beta 2 (expires May 1, 2006)
o       Microsoft Visual Studio 2005 Team Foundation Server Beta 2
o       Microsoft .NET Framework 2.0 Redistributable Package Beta 2
o       Microsoft SQL Server 2005 Community Technology Preview
o       Microsoft Office 2003 Standard Edition
o       Microsoft Live Communication Server 2003


Minimum System Requirements
-------------------------------
o       PC with 2.0 gigahertz or faster processor
o       1.5 GB RAM minimum
o       10 GB available hard disk space
o       Super VGA (800 x 600) or higher video
o       DVD-ROM drive
o       Microsoft Virtual PC 2004 SP1 software

Thursday, July 21, 2005 8:57:10 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Team System
# Wednesday, July 20, 2005

David Pallmann was first to have an Indigo book out in the public. See http://www.microsoft.com/MSPress/books/7703.asp for details.

Two sample chapters are available on the MSDN web:

I'm halfway through the book and so far its well worth the money! The book is more of a how-to book than a reference book, but for a first book on Indigo that is just right!

Unfortunately the book has some minor flaws (like typos and plain errors) which makes it necessary to look up details in the SDK documentation from time to time instead of just reading the book.

I'll update this post with a resume of the book.

Wednesday, July 20, 2005 11:04:03 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Indigo

The setup procedure described in the SDK documentation to reinstall Indigo has some bad file references. The docs should be updated for beta1 but until then this is the correct procedure (with the correct file paths):

"%windir%\microsoft.net\framework\v2.0.50215\aspnet_regiis.exe" –i
"%windir%\microsoft.net\framework\v2.0.50215\xws_reg.exe" -i
cscript "%windir%\microsoft.net\framework\v2.0.50215\InstallIndigo.js"

Wednesday, July 20, 2005 10:59:26 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Indigo
Yasser Shohoud (Microsoft) has published a set of slides about Indigo Beta 1 (RC1). The files are on his site http://www.learnxmlws.com/ (download the presentations directly here: http://www.learnxmlws.com/files/LapAroundIndigo.zip).
Wednesday, July 20, 2005 10:52:50 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
Indigo

I've long thought about ways to share small, hopefully useful things I come up with. I've also wanted to collect and share interesting and sometimes not obvious things I find in the development community. I've managed this in various ways so far, until it recently occurred to me - I need a blog. My blog should be a place where you can find things about architecture and development in general but with focus on communication solutions (i.e. web services). I've recently played a lot with Microsoft's new communication platform, Indigo, and I think there are a lot of stuff to share in that area. I hope this will be a useful source of information to others.

Wednesday, July 20, 2005 10:45:04 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -

Navigation
Archive
<September 2005>
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008
Mathias Olausson
Sign In
Statistics
Total Posts: 74
This Year: 22
This Month: 6
This Week: 2
Comments: 29
Themes
Pick a theme:
All Content © 2008, Mathias Olausson
DasBlog theme 'Business' created by Christoph De Baene (delarou)