[NoBrainer] Saving bandwidth with JSON when consuming ODATA services from PowerShell

When working with ODATA sources from PowerShell via a service reference (instead of using explicit REST call via Invoke-RestMethod) the .NET DataServiceClient will use Atom/XML under the hood. This works perfectly well except it consumes much more bandwidth because of the XML data format. As the whole ODATA interface is encapsulated via your service reference […]

WebAPI and “The response to this POST request did not contain a ‘location’ header. That is not supported by this client.”

I just came across another nuisance in .NET WebAPI that I want to share with you quickly. In one of our LightSwitch projects we use WebAPI ODATA controller to help out when LightSwitch internal capabilities come to their end. As we are using a PowerShell once in a while as you might already have guessed […]

[NoBrainer] Using JayData with jQuery select2 plugin in LightSwitch HTML

In this post I quickly describe how you can use the select2 plugin with LightSwitch HTML client and present data from ODATA sources via jaydata. LightSwitch has builtin capabilities for selecting related entities via the ‘Modal Data Picker’ control. You can also have drop down or choice lists with static data, however they lack the […]

HTTP 406 when mixing WebAPI RouteTable.Routes.MapHttpRoute and HttpConfiguration.Routes.MapODataRoute

[UPDATE] 2014-11-28 Jerther sent me a comment (see below) on how he solved this issue! So how did he do it? The short answer is, that you have to include special registration code inside the ‘Application_Start()’ and other places where the order on how you code it plays a crucial role. Check out his post […]

Microsoft.AspNet.WebApi.Client 5.2.0 not compatible with LightSwitch Silverlight Client

When trying to add the current “Microsoft.AspNet.WebApi.OData” to a LightSwitch project I got the following error message: We are not using Silverlight in our application, only the HTML client – except when doing user and role administration … As a matter of fact we only need the package on the server layer anyway. So the […]

HOWTO: Create a LightSwitch compatible OData REST Web API Endpoint without EntityFramework

LightSwitch can consume ODATA data source that you can use to gain more flexibility than using the internal data sources that also generate ODATA REST endpoints. Microsoft Web API provides an easy way on how to generate these endpoints. In this post I quickly describe the steps you need to take to actually create an […]

LightSwitch: Modifying roles, permissions and users via PowerShell

Using the built-in RBAC feature of LightSwitch is really cool and easy to use until you have to assign all of your application defined permissions to roles and users. This is usually where the Administration DesktopClient does not scale too well… But of course there is help: and it is especially easy, when you utilize […]

Being serious about the command table pattern – and adding security to it

Reading Paul’s article Being serious about the Command Table Pattern definitely helped me on a tricky problem I had to solve for a customer. However when you really make heavy use of that you will notice that you now have only reduced security features available. For example, when you want selected users to only read […]