Work
K2 SmartObject Services – Configuration update, static endpoint
After the release of K2 1370, there have been some small updates to the K2HostServer.config file for your SmartObject Services configuration.
The basics is pretty simple, KB1370 added the ability to change binding and binding configuration on the REST and WCF endpoints separately. Because the binding configuration also defines the authentication mechanism, this means that REST endpoints could use basicHttpBinding with Basic authentication, while the WCF endpoint uses wsHttpBinding with Windows authentication. It also allows us to run either one endpoint on HTTPS while the other is not.
In my previous post on the K2 Services I showed you how to create a static endpoint, this simplifies the URL and allows you to rename or update the SMO without the endpoint changing. The configuration sections shown in those posts are now outdated and won’t work anymore. Since the KB article describing the change doesn’t have all the parameters, this post is also a note-to-self.
Notes on K2 Inline functions
Not a K2 insider anymore...
K2 on your Mobile
K2 and jQuery: Creating a simple Worklist
With the release of K2 Services in the 1290 release, we’re able to get all sorts of data using RESTful services. These services provide output in 3 formats:
- XML
- ATOM
- JSON
XML is the default output. ATOM is a feed-style output which is in essence XML. And JSON is the one we’re going to use. JSON output can be seen as the serialized output of a JavaScript object. This makes it very easy to use in JavaScript and especially jQuery.
K2 SmartObject Service and Versioning
Since the coming of the K2 SmartObject Service in KB1230 , people might have noticed the smartobjectVersion parameter in the managedEndpoints definition. Since SmartObjects have been around, they always had a version. The version number starts at 0 (zero) and increases by 1 (one) when the SmartObject is deployed.
LINQ2SQL: Where is the DataShape class?
C# using statement and the K2 APIs
Recently in one of our projects, we had to do some performance optimizations that required us to look a bit closer at the resources our application used. In general, you should always dispose an object that’s implementing the IDisposable interface.
K2’s client API’s use a connection to the K2 server which needs to be closed and disposed after you’re done using them. In C# you can use the using-statement to dispose your objects when you’re done with it. The using-statement only works on objects that inherits from IDisposable.
Here are some examples of how to correctly use the using-statement when using K2 API’s.