Archive for February, 2009

XSLT 1.0, Join a list of elements’s value with separator

By admin - Last updated: Thursday, February 26, 2009

In order to join a sequence with a customized separator in XSLT 1.0, similar to C# function string.Join( array, separator), I’ve come up with a template which takes the sequence and separator as parameter. Given a sample XML <?xml version=”1.0″ encoding=”utf-8″ ?> <?xml-stylesheet type=”text/xsl” href=”ElementJoin.xslt”?> <Root>   <Years>     <int>2008</int>     <int>2009</int>   [...]

WCF Soap11 vs Soap11WSAddressing10 vs Soap11WSAddressingAugust2004 vs Soap12 vs Soap12WSAddressing10 vs Soap12WSAddressingAugust2004

By admin - Last updated: Sunday, February 22, 2009

I’ve done some quick test on WCF interoperability of the SOAP versions and WSAddressing. SOAP 1.1 vs SOAP 1.2 SOAP 1.2 is an extended version of SOAP 1.1, it does everything that SOAP 1.1 offers, SOAP 1.2 provides clear processing model and it is based on XML infoset, it has no dependency on the underlying [...]

WCF WSDL & xsd:import schemaLocations link to local machine name not domain name while hosted in IIS

By admin - Last updated: Saturday, February 21, 2009

When WCF svc web services hosted in IIS, the links within WSDL for xsd schemaLocations uses local machine name, the will cause issues when 3rd parties try to obtain the complete WSDL reference from the server unless they modify the main WSDL file to change those schemaLocations links to use domain name for the xsd:import. [...]

WCF Could not establish trust relationship for the SSL/TLS secure channel with authority

By admin - Last updated: Saturday, February 21, 2009

I saw people ask questions on the forums regarding to “Could not establish trust relationship for the SSL/TLS secure channel with authority” while attempting to call the web service via a host domain name other than the one specified in Issue-To within the SSL certificate. Most likely you are using the same certificate for the [...]

Reduce computer noise

By admin - Last updated: Thursday, February 19, 2009

If you think the PC gets a bit louder than before, mostly likely your CPU is over heating because the cooler system is not working properly. I had experiences of reducing the noise with two of my PCs. The solution I did for the older PC was two years ago, the noise was due to [...]

XSLT XML transformation vs Object mapping

By admin - Last updated: Monday, February 9, 2009

I’ve run some tests on transformation from one XML schema to the other so that I can compare the performance between XSLT and XmlSerializer with object mapping as well as the Pros and Cons. It appears XSLT transformed my source XML to target XML faster than the object mapping since XSLT doesn’t take the type [...]

How does LINQ to SQL concurrency detect conflicts

By admin - Last updated: Friday, February 6, 2009

LINQ to SQL utlises optimistic concurrency control (OCC) to determine the conflicts. OCC compares the loaded record to existing record before performing an update operation on the row so that the underlying conflicts could be detected. The followings are steps to replicate the scenario, Table Fruit Id Name UnitPrice Description 1 Apple 2.5 very long [...]

LINQ InsertOnSubmit, DeleteOnSubmit and SubmitChanges not working

By admin - Last updated: Sunday, February 1, 2009

I had the same problem with SQLExpress database file. In one word, I looked at the records from the wrong database. There were actually two versions of the database file. The mdf file gets copied over to bin\debug\data folder e.g. bin\debug\data\test.mdf after compilation, but I verify the data against the one within solution. This likely [...]

C# Polymorphism and Inheritance override the abstract or virtual

By admin - Last updated: Sunday, February 1, 2009

Occasionally, programmers get to explain Polymorphism and Inheritance in .NET, I’ve compiled some typical use cases in case they need to be explained without IDE. We start with IDrawable interface which indicates all its implementations have a Draw method. Geometry abstract class which contains PrintType() that will be called by the specific implementation. Shape class [...]