Skip to content

Category: LightSwitch

Microsoft LightSwitch

LightSwitch 15

Consuming ODATA Services from LightSwitch with Impersonation

In case you are still using LightSwitch and are not entirely relying on its internal features, you might have started using ODATA services as LightSwitch data sources. This comes in especially handy when combined with the Microsoft Managed Extensibility Framework (MEF) which lets you create decoupled components that can be easily plugged into your core application. However, as soon your […]

LightSwitch 0

Relative Path to DLL References in LightSwitch Projects

When I was writing unit tests for an ODataController I needed the references to the Microsoft.Lightswitch.dll and to the Microsoft.LightSwitch.Server.dll in the unit test project. I tried to add them with the Reference Manager in Microsoft Visual Studio (Solution Explorer: Right click on references -> Add reference…) but couldn’t find the references. The Reference Manager allows you to browse for […]

LightSwitch 2

Cloud Business Apps with LightSwitch and SharePoint 2013 – The Pain with iOS and NTLM

Introduction This article describes building a Cloud Business App with LightSwitch HTML (2013) and SharePoint 2013. As you know, LightSwitch is a fantastic technology to develop fancy and responsive apps. A lot of articles already describes how to build them. Integrating in SharePoint 2013 as an app is also already described in many articles, so I won’t write this again. […]

LightSwitch 0

Using LightSwitch with EntityFramework 6 and CodeFirst based ODATA Controllers

Enhancing LightSwitch applications with additional ODATA or WebAPI controllers is a pretty common task. However when you try to build a CodeFirst based controller in combination with EntityFramework 6, you will run into a lot of errors by default. Here are the steps to get this cleared and running: 1. Create a Visual Studio LightSwitch HTML project In this example […]

LightSwitch 3

A simple ODATA v3 Controller for ActiveDirectory search operations

Today I would like to present you a simple ODATA search controller that you can use in LightSwitch (or any other ODATA consumer) to look up user accounts (and possibly other objects). When using SharePoint you will probably know the very convenient PeoplePicker. However, in LightSwitch (HTML) there is no equivalent to that. You certainly have “Person” objects/data types but […]

LightSwitch 3

[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 it really does not make […]

LightSwitch 2

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 from our web site we […]

LightSwitch 2

[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 convenient search and filter mechanisms […]

LightSwitch 0

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 solution to this is to […]