I’ve been ranting to some colleagues about a particularly useful table that showed the interactions between WCF’s InstanceContextMode and ConcurrencyMode behaviors. I referenced it in a conversation again today and decided that I needed to go hunt down the phantom table so that it haunted me no longer.
I thought the table was in Lowy’s Programming WCF Services. Full attribution to Essential Windows Communication Foundation: For .NET Framework 3.5, one of my other favorite WCF books. I’ve copied the table below so that I can refer to it by hyperlink forever more.
The table is awesome because it shows you the results of the different ways of combining these two important WCF concurrency settings, including the default combination. Without some trial and error, it’s not always easy to intuit what the combination of these settings means. This table makes it easy.

1 Comment »
I’ve had the opportunity to spend the last week or so investigating a system integration challenge involving PowerBuilder and .NET communicating with web services hosted on a mainframe. It’s been an interesting experience that’s enabled me to dive deep into .NET and to learn a bit about where PowerBuilder is at and where it’s heading. My outtakes follow:
- What’s .NET got to do with it? I was totally perplexed at first when I got asked to assist with a challenge integrating a PowerBuilder client with mainframe web services. I saw .NET in the middle of the diagram but was perplexed “what’s .NET have to do with a PowerBuilder client-to- mainframe integration?”
- .NET is PowerBuilder’s future. Seems that the future of PowerBuilder is bound to .NET. Check out the diagram below or the PowerBuilder 11.5 (current) and 12.0 (beta) features. Support for Code Access Security (CAS), IIS7, WPF and WCF.

- Why Use PowerBuilder at all? Been asking myself this here. PowerBuilder 12 is being touted as a “Complete and highly productive .NET development solution”. Uh… isn’t that VisualStudio? Even with legacy compatibility considerations, isn’t it eventually just time to cut the cord? Didn’t we learn anything from VB.NET?
- Diving Deep. To my final point, as a non PowerBuilder guy, I’ve been relegated to analyzing the PowerBuilder-to-.NET interaction from the outside in. The process of generating proxies (shown below), first in .NET for a SOAP-based service and then in PowerBuilder to interoperate with .NET, provides lots of opportunities for suboptimal behavior. ProcessMonitor from SysInternals really is man’s best friend in these situations. When I compare the traces from the integration attempts with my pure .NET test calls, I’m seeing a bunch of opportunities for optimization. Now I need to find someone who understands how PowerBuilder works under the hood so that we can determine how to optimize the .NET invocation.

1 Comment »
This is one of those seemingly trite blog entries – unless you’re actually trying to integrate System.Data.SQLite with NLog, in which case it’s invaluable. SQLite and NLog really are the perfect combination for lightweight logging. You avoid the sprawl of file-based logs over time, can execute SQL queries against your logs and have an absolutely minimal database footprint to deal with. If only you can get the configuration correct…
The NLog documentation provides some hints to get you going in the right direction for database-based logging. However, no matter how much spelunking I did around the Net, I couldn’t find a definitive answer on how to configure NLog to use SQLite. The configuration file that worked for me can be found below. Exact mileage may vary based upon your project setup. This should get you 95% of the way there though. Happy logging!
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="File" xsi:type="File" fileName="C:Logfiles${shortdate}.nlog.txt"/>
<target name="Database" xsi:type="Database" keepConnection="false"
useTransactions="false"
dbProvider="System.Data.SQLite.SQLiteConnection, System.Data.SQLite, Version=1.0.65.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"
connectionString="Data Source=C:ProjectsDatabasesLogging.s3db;Version=3;"
commandText="INSERT into LOGTABLE(Timestamp, Loglevel, Logger, Callsite, Message) values(@Timestamp, @Loglevel, @Logger, @Callsite, @Message)">
<parameter name="@Timestamp" layout="${longdate}"/>
<parameter name="@Loglevel" layout="${level:uppercase=true}"/>
<parameter name="@Logger" layout="${logger}"/>
<parameter name="@Callsite" layout="${callsite:filename=true}"/>
<parameter name="@Message" layout="${message}"/>
</target>
</targets>
<rules>
<logger name="*" minlevel="Debug" writeTo="Database" />
</rules>
</nlog>
1 Comment »
Three months after the PDC conference and I’m finally catching up on the reading materials I collected in LA. One of the books I picked up was a copy of the Patterns and Practices Group’s A Guide to Claims Based Identity and Access Control. It turns out that this book just RTM’ed and is now available online in PDF and HTML formats.

This book is unique in the Microsoft world. You can find all kinds of books that scratch the surface of application and web service security. If you’re looking to dive deep and understand Claims-based identify and federated security, you were relegated to piecing bits of information from blogs, MSDN, and other sources – until this book arrived. The books takes a topic that is complex and difficult to comprehend and approaches it from the perspective of several personas: a security specialist, software architect, developer, and operations manager. While this is by no means an O’Reilly Heads-First style book, the persona approach, professional illustrations, simple metaphors, and meaningful examples go a long way towards making the material much more digestible.
After a basic introduction to claims and claims-based architectures, the book dives into 4 detailed examples.
- Claims-Based Single Sign On for the Web
- Federated Identity for Web Applications (including Azure)
- Federated Identity for Web Services
- Federated Identity with Multiple Partners
For each of these topics, the book provides a case study complete with diagrams, code snippets, and commentary from the technical personas. Complete source code is available on line as well for those who want to dive deep into the details.
I’m about three quarters of the way through the book now and have found the book to provide an excellent learning experience. It was humbling to find out how little I knew about how to establish claims based identity. On the other hand, as I look at some upcoming client work that is asking for claims based identity and the use of ADFS, I’m really glad that I’ve had the chance to work through this book and familiarize myself with the lay of the land prior to diving into the deep end.
No Comments »