Configuring Silverlight to access a NT Authenticated WCF Services :
  • add .xap -> application/x-silverlight-app to the mime type in IIS to get IIS to recognize and transmit the mime type
  • add .xaml -> application/xaml+xml to the mime types in IIS to get IIS to recognize and transmit the mime type
  • add the clientaccesspolicy.xml to the root folder in IIS to get the cross domain working for wcf debugging
  • Ensure that you have the IIS virtual directory security set to use NT authentication only
If we modify or create new services inside the service class, it is necessary to make sure the URL is set correctly in the ServiceReferences.ClientConfig file in the Silverlight project when you update the service reference. It defaults to a value that is different than the value visual studio uses when the debugger is run, which causes an exception to be thrown when the silverlight call goes through to the service.

 (More)

While I am critical of Microsoft, its because I know they can do better than they have in recent years. If you put the dismal performance of Vista and the horrible marketing campaigns of late, Microsoft outside the consumer and platform sphere has created some incredibly innovative products for developers over the last few years. Linq, and WCF are just two recent examples - not to mention the new SQL server 2008 which is amazing as well - more on that in a later post...

Unfortunately, it is Microsoft business model that needs innovation - not their tools. It is mired in the world of PC software - often to the detriment of new and innovative ideas.

Fortunately, Silverlight looks like a breakthrough technology for Microsoft: mainly because it shows a change of attitude. Microsoft is finally getting serious about cross platform support, and the web as the application platform. I have often wondered why Microsoft has not made a .net VM host for other platforms - Mono aside. The obvious answer being fear of cannibalizing its windows franchise. I personally think Microsoft, if it were serious about this battle for the web, would make windows free for consumers, and instead shift its focus to a subscription service based model: say $50 a year for support for Windows or something to that effect. It would cost it a fortune initially, and would affect their stock price (could it get worse??) but would force the company to formally acknowledge what has already happened: Operating systems are a commodity.

Anyway - fantasy aside - It seems that Silverlight is at least a start at Microsoft opening its platform up to other operating systems.

Silverlight allows for .net managed code to run on any platform using Windows Presentation Framework. I am very excited about this, as many of the apps we are looking at building can then be made to run on any platform. It is of course possible to do this with Ajax, which I have done, but it will be nice to have the advantage of a full fledged debugger and a nice set of tools that finally is graphic designer friendly on the Microsoft side (Google of course has had this for a while with its GWT - I have never liked Microsoft's native implementation of asp.net Ajax - its complicated and messy).

I already have a version of a managed code graph written in C# using the open source Visifire control working in IE, Firefox, and Firefox on the mac (have to try linux next)... using the same code base. This graph gets its data from a WCF service that pulls data from our accounting system.

Here it is running in firefox on my MacBookPro:

d

Getting this working though was a bit difficult from a configuraion standpoint.

 (More)

Needed to set the style of a line in Virtual Earth.

This seems to be a bit of a hidden function, so took a bit of work to find:

Usage: shape.Primitives[0].symbol.stroke_dashstyle = "Dot";

Other line types:

Solid, ShortDash, ShortDot, ShortDashDot, ShortDashDotDot, Dot, Dash, LongDash, DashDot, LongDashDot, LongDashDotDot


Very exciting - we have setup SQL 2008 and I am now working on extending our syncrhonization system to incorporate spatial information....I will be making notes here as I work on figuring out the SQL spatial extensions. Some of these will be fairly simple to begin with, until I become familiar with the syntax.

To that end: one of our tables had lat/long information in it in standard floating point format. I needed a query to update this information into the new Geography column I created. The update query to do this:

update WaterWells set Coordinates =
geography::STPointFromText('POINT(' + CAST(LONGITUDE as varchar(50)) + ' ' + cast(LATTITUDE as varchar(50)) +')', 4326);


As noted in another post, I am using Dynamic Linq to build a generic query tool for a service layer I am constructing. In the process of doing so, I have run into the following error when I try to pass a query in for a Guid:

Operator '=' incompatible with operand types 'Guid' and 'String'


For the past 3+ years, at Matrix we have been evaluating smart phones for corporate use. For most companies, the selection of a smart phone device is a non-issue: its RIM's Blackberry product and associated BEZ (Blackberry Enterprise) server.

Being a Waterloo University engineering graduate, I certainly would have no qualms about going the Blackberry route for a corporate smartphone device. However, working through the evaluation process at the corporate level puts a different perspective on these devices.

The biggest issues are: cost (device, dataplans, setup), maintenance, usability (not always in that order) and finally farther down the list - application platform. By application platform I am referring to custom business applications that are outside of contacts, email and calendar. I suspect as time goes on the application platform item will become more important at Matrix, but right now its not a priority.

Matrix users at present though have very basic requirements for a smartphone - they want it to work well as a phone, and be able to use it as a tool for managing their calendar, contacts and email in that order.

The Blackberry excels at these, but its requirement for a server to enable corporate messaging makes it more costly than other offerings, when you factor out the device as an application platform.

While the Blackberry Enterprise Server provides more value in terms of features, the market it was designed to serve has changed since its inception. The security measures on other platforms, while not as sophisticated perhaps as the BEZ, are good enough to be effective (more about this later). The dataplan monitoring and restrictions were something that used to be important - but now that phone companies are being forced to provide more logical plans that offer data pooling and reasonable data limits, the requirement for centralized monitoring has diminished significantly. The BEZ acts as a platform for software development - but other platforms are now providing sophisticated developer tools as well.

Finally the BEZ requirement adds yet another server (albeit virtual) that requires licenses, maintenance, updates, expertise and attention. The additional requirement of a CAL for devices connecting to the BEZ add another layer of cost - especially when you consider that many companies already pay for Exchange CALs.

So at Matrix, the focused shifted to evaluating mobile devices that could directly connect to Exchange via the Exchange push mechanism - which narrowed the search to Windows Mobile based devices.

 (More)

Very exciting news - an article co-authored by Barry Lawrence of BSTGlobal and myself based on a system now in production at Matrix has just been published in the Microsoft Architecture Journal.

The article is on the subject of Enterprise Identity Synchronization and describes a synchronization pattern and associate system architecture for keeping enterprise identity data up to date between disparate systems. In effect - it is a system for replicating identity memes around an organization.

This has proven to be a fascinating project from a number of standpoints, and I have learned a great deal from the experience of being involved in designing and building a services oriented workflow architecture. The implementation of the system has also been very fascinating, and is a real case study in how systems, people and processes are inherently intertwined. I will write a number of blog posts on the outcome of this project over the next few weeks.


Just finished reading The Big Switch – excellent book. The key to making the firm I work for (Matrix Solutions) successful is to minimize overhead and infrastructure costs as much as possible. While Matrix’ only product is information, as your book points out, we are in the business of collecting, interpreting and managing knowledge for our clients – not building and managing IT infrastructure.

Therefore - I am always looking for ways to reduce costs of IT by leveraging wherever possible the kinds of ‘utility’ services discussed in the book, and have for some time been a believer in SAS.

Matrix right now is still very much in the ‘older’ model of IT services, in which we still own and manage an IT infrastructure based on Microsoft servers and applications which the company owns. (More)

As part of the workflow service project, I need to build an XML querying framework.

For this to work on the back end, I would like to use Linq - but in order to do so, I need to have it be capable of handling dynamically generated queries derived from the query XML coming into the service.

It appears that Microsoft has produced samples of this - Dynamic Query.

There are a number of good examples around:

ScottGu's dynamic query example:

Linq Dynamic Query C# class

Blog post that includes a join example:

The issue though with Dynamic Linq is that you appear to trade the strong typing associated with standard Linq for the flexiblity of Dynamic query.

A query executed with Dynamic Linq returns as a type of 'DynamicClass1' etc. which cannot be cast to other types. This means that a generic mapping process of some kind would have to be used to get the data back into some kind of strongly typed form.

In the case of what I am working on, I don't need the strong typing. I am working on setting up a service entry point for generic querying of data associated with the service in question. The query language coming in will be constructed in XML, and defined using a typical XML query pattern.

These queries will be translated to dynamic linq, which is then executed and mapped back to XML from the generic dynamic class generated.

 (More)

I have been constructing a workflow based service engine using WCF and WF with the intention of using infopath forms to route data through the engine.

Fortunately, the company that supplies our Project Services Automation system BSTGlobal has built just such an engine they call BSTFX. This tool is a set of service contracts and objects coupled with a management console and WCF hosting system that takes quite a bit of the work out of building a stable service oriented workflow.

One of the tricky bits though has been figuring out how to get Infopath to talk to a WCF service.

 (More)

Infopath is a great tool - but it does have some very strange quirks. For example, something that should be simple to do - such as setting a default value in a field based on a drop-down list setting in the form turns out to be incredibly difficult.

This is because infopath for its rules processor relys on Xpath statements, which can be a bit tricky to work with (they remind me somewhat of regex statements). It is possible to use managed code to get around such limitations, but one of the reasons we wanted to use Infopath was to allow non-programmers to build their own forms.

Having to use managed code for something simple like this defeats the purpose of using Infopath.

At any rate: here's the xpath statement structure you need to set a field's default value based on a drop-down list setting elsewhere in the form:

concat(substring("11.3", 1, (../../my:SampleType = "Plot" or ../../my:SampleType = "PartialPlot") * string-length("11.3")), substring("0", 1, (not(../../my:SampleType = "Plot" or ../../my:SampleType = "PartialPlot")) * string-length("0")))

This one sets the default value of the field its assigned to (PlotSize) to 11.3 or 0 depending on the setting of the SampleType field. I got the basic statement from the Infopath Team Blog.


Had a great time, great conversations.

Here are some initial thoughts from one of them:

Meme Emergence:

'meme catcher of future memes' - there is a re-emergence of interest in the school of thought in the evolutionary biology space called 'Evo Devo' (evolutionary developmental biology). This investigates the idea that evolution may alter developmental processes and build new and novel structures from old gene networks based in reaction to environmental pressures.

 (More)

I am attending the Patterns and Practices conference in Seattle at Microsoft. There were a number of other conferences I looked at attending, but I have wanted to visit the Microsoft campus for a long time, and it seemed to be a good excuse to do so.

The lecture schedule at the conference is pretty intense, and is held at the Microsoft conference center, so there is not a lot of opportunity to tour around either Seattle or even the campus itself. I am hoping that I can get a bit of a look around later in the week.

The conference features an excellent set of speakers, and is incredibly well organized and run. It has a nice blend of theoretical, practical, practices, methodologies. The conference center food has been outstanding, and there have been none of the issues with long lineups you often find at conferences.

They also have had some great after hours events, so far all involving beer (a very good thing). There are some great local beers - tried Fat Tire, Mginties(?), EBS so far. Tonight we have an evening with Microsoft Research, which should prove very interesting.

The hotel is a bit mundane (typical sort of suburban style), but is quiet and at least has a decent weight room.

I would highly recommend it to anyone who is involved in working with developing, designing or managing software projects.

One of the things I really like about this confrence is that it does not have a 'microsoft' centric focus. It is not a 'sales' pitch, which is something I was a bit concerned about when I first signed up for the confrence.

There are sessions that focus on Microsoft's development tool offerings of course, but the focus is not on the marketing but on the application of these tools to solve problems.


Was setting up to link our accounting database which runs on 32 bit SQL 2000 to our spatial database, which runs on 64 bit SQL 2005 and kept getting a strange error when executing the distributed query:

After trying the microsoft knowledge base article, which did not work, I found John Hofman's blog.

His method did work...Kudos you rule, and thanks for saving me hours of frustration!

(hit more to see original post).

 (More)

Turns out the Microsoft workflow engine extension for Visual Studio and Sharepoint is not so easy to use.

After installing it, there are a number of things that must be done that are not documented in order to get it working on a development machine.

I am assuming that if I installed visual studio on the sharepoint server itself, it would all work just fine, and perhaps that is the way to do this sort of thing. ** Follow up - this is the case, but I would not consider it a good practice to have to put development tools on a production server. It looks like Visual Studio 2008 solves all this by having a publishing mechanism that works with it that does not rely on batch files.

When I get the virtualization thing setup, I will construct a VM that has all that stuff installed. Until then, the rest of this post describes the things you must do to get it all working.


 (More)