28 October, 2009

Run 32bit apps on x64 machine

I’ve shifted into running x64 bit (Windows 7) and am really liking it so far.

However - there is only one application that I could not get to work as it was written in C++ and for 32bit OSs. Well – Windows SDK to the rescue. The SDK contains a little utility called Corflags.exe. The CorFlags Conversion tool allows you to configure the CorFlags section of the header of a portable executable image. This means (in human terms) that you can force the OS to run the app anyway (even it was marked for x86 initially).

The syntax is this:
CorFlags.exe <myapp.exe> /32bit+

Just run this command once, and you can start the app on the 64 bit OS.

The SDK (for Win7) can be downloaded here: http://www.microsoft.com/downloads/details.aspx?familyid=C17BA869-9671-4330-A63E-1FD44E0E2505&displaylang=en

19 October, 2009

WCF and WSDL: targetNamespace

WCF and WSDL is two different things that sometimes brings in troubles.

I today struggled a bit with being allowed to set the targetNamespace of the WSDL being generated from WCF. Even you set the [namespace]-property in your contracts, the WSDL being generated does not listen to this.

If you click the second image, you see where the problem lies. Even I have attributed the ServiceContract like this:

it still presents this WSDL:


The solution is found in ServiceBehavior configuration! To control what is emitted as targetNamespace, you need to specify this in the ServiceBehaviour-configuration like this:

The final result (WSDL-wise) is this:


All is fine and dandy!

iPhone/XCode - not all cases are equal!

This bit me! Having made some changes to an iPhone application (Obj-C); everything worked fine in the simulator. But, when deploying the s...