I’m currently doing research and revision for my 70-487 exam – Developing Microsoft Azure and Web Services. I was doing some reading and I encountered some information about hosting WCF Data Services and OData. It wasn’t something I had encountered in so far – so it has been an interesting and exciting prospect to look into.
I found a wonderful step by step tutorial into creating and hosting a WCF Data Service on MSDN, so I went through it.
First problem : I need some data. I’m quite getting into LocalDB at the moment – I’m thinking about the possibility of creating a developer database through migration scripts – so that a developer could clone a Github repo and run the project. The Database would be automatically created for them, and populated with sample data (if appropriate) – meaning that developers could run this project without a dependency on a database or fancy storage like that.
I managed to get the SQL Scripts for Northwind from codeplex – but with almost everything that Microsoft does these days being on github – going back to codeplex seemed old and outdated.
I followed through the instructions and ran the project.
OData seems to be very similar to REST – except that the url used are representative of the entity structure(rather than hiding behind controllers), and query like operations can be passed through to the server – giving maximum flexibility in terms of usage. So – anyway… I ran my project from Visual Studio 2015.
Metadata from my WCF Data Service
Yay – I have metadata about my service.Next step was to view the contents of the customers service by subtly altering the URL to add Customers to the end.
And then this happened :
Customers can’t be downloaded?
A pop up from Edge saying that Customers couldn’t be downloaded? That can’t be right. Let’s have a look at the same thing on Chrome.
Loading the Same OData service on Chrome reveals lots of lovely data.
So what’s going on here – my service works fineunder Chrome – but fails under Edge? Only Edge? How about IE
Acessing the OData Service on IE does present data – which IE interprets as an RSS feed.
It does seem to show the data under Internet Explorer – so it just appears to be the Edge Browser which is causing the problem. Next up – let’s run the network tab, and we’ll see what’s shaking.
Requesting the OData Service is stuck at Pending
So – notice that the result is still pending? In comparison navigating to http://localhost:50739/NorthwindCustomers.svc/ returns the following:
Accessing the OData Metadata on MS Edge does seem to return (response code 200)
Currently I’m working under the theory that Edge just doesn’t understand an element of the communication received. Given that the same service is being used for all browsers, then the issue is down to how Edge interprets some header received from the server.
Next up : I’ll record the headers that are returned from the service and see if I can determine a difference between the browsers – until I learn more though, I’ll have to work under the assumption that Edge just won’t work with this stuff
Windows 10 IOT on a Raspberry Pi 2
I’ve just installed Windows 10 IOT edition on a Raspberry Pi 2 – and I have my suspicions that this isn’t necessarily the same operating system that I am running on my laptop.
Let’s have a bit of context
The challenge to IT – and indeed to us developers – is that users are no longer experiencing our applications or operating systems on the boring beige box like they used to. People are just as likely to use their phone or a tablet as a laptop or a desktop to run that shiny new app. This is something we need to consider when designing the user experience for our products – be they operating systems or applications.
So Microsoft has been working towards unifying their operating systems – which is why you can now get windows 10 running on mobile phones such as the Lumia 550 or Lumia 950 and even the Surface product range. I believe that Microsoft are talking here about the main kernel for their OS, rather than the whole OS. A window manager for desktop PC’s would be very different from a window manager for Mobile phones or tablet based systems. Except that I don’t believe they have gotten around to their IOT offerings yet.
Microsoft’s process for interacting with Raspberry Pis, and turning them into IOT devices is simple enough. Instructions and write ups for the Raspberry Pi can be found here but Windows 10 IOT also supports Minnowboard MAX and the Qualcomm DragonBoard 410c – but with DragonBoards costing roughly £60, and minnowboards going for roughly £100 , the obvious choice is a raspberry pi costing £30. I happen to have a spare raspberry pi hanging around, so I thought I’d give it a go. I set up the pi using the IoT Dashboard Tool.
After my machine had booted, I clicked around on the web based dashboard, looking at my wondrous new machine that was connected to the TV in the other room.
Yes- so that’s definitely my Raspberry Pi2 running Windows 10.
Clicking on some of the options I found a debug page, which listed 2 errors – which I thought was strange considering that the device was doing nothing.
Out of the box – 2 errors. Hardly inspires confidence.
Being the inquisitive sort I clicked on the first error, which confusingly is at the bottom of the list :
|1/21/2016, 10:50:46 PM
||Critical unknown a0795c9de6cdb1f43e165a29b7f6d42caeb2b
Clicking on the Name took me to a detailed screen showing more information about the error :
Confused by an obscure error? This page will help clear it right up.
The friendly name for that error : WindowsPhone8ExecManService
I’m not a gambling man, but I reckon that all Microsoft have done here is compile their windows 8 phone OS for the ARM chip on the Raspberry Pi, and replaced the front end string resources with “Windows 10”. For those interested, the Chip in the Raspberry Pi is a quad-core ARM Cortex A7 – the same processor running on the Microsoft Lumia 550 – which while based on the SnapDragon 210 SOC, has ARM Coretx A7 Processors.
Was able to find something for the WindowsPhone8ExecManService error on stackoverflow :
The value EM_WATCHDOG_TIMEOUT likely indicates that you have blocked the UI thread with a long running piece of code or a wait of some description.
Mark Radbourne [MSFT]
So my computer moaned at needing to be restarted – so I obliged, and when it rebooted I got the following message from Outlook.
We’re having trouble…
Makes me wonder…. Who else do I know who has ‘a little trouble’….
Ooooh…. Betty… I’m having a bit of trouble starting Outlook.
You may remember in a previous post, that I was looking at an automation system for an internal application. Today I stumbled across the the Java robot class. It is described in the help page as
This class is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed.
So this seems like it might be a contender until I read this blog post.
We have found that this approach is dangerous.
- Robot tests are very fragile, breaking any time the GUI layout changes.
- If the user moves the mouse while the tests are running, the Robot continues clicking, sometimes on the wrong application.
 One programmer reported that the Robot sent a partially completed email because it clicked on the send button of the mail client instead of a button in the application being tested.
- Since the tests run so quickly, it can be impossible to stop the tests once the Robot gets confused and starts clicking on other apps and typing characters that show up in other windows.
If you really feel that you could use some Robot tests, consider naming them differently than other tests. You might have a collection of RobotTest*.java tests. You can then run them independently of other tests, if you are extremely careful to avoid touching the mouse while the tests run.
So based on that I think I’m going to stick with my reflection based library.
Regular readers of the site might notice that I keep almost deliberately tight-lipped about where I work for real. That’s right dear reader – Although we live in the bunker – it ultimately doesn’t really pay the bills. Nope, to do that we engage ourselves within various industries.
I’ve always been a little cagey about talking about employers, and I sort of feel that Titanium Bunker is my thing, and I don’t want to muddy the waters between a ‘professional’ career, and the funny little projects I work on at home.
But I’ve recently been working on a project for my employer that I find personally interesting, and thought I’d write about it here. Now – to clarify : My employer has not asked me to work on this directly, rather this is a project that I am working on because I think that it will ultimately add value to the business, and it’s also an interesting problem to solve.
So here’s that problem.
This is what happens when your display driver crashes under Windows xp… pain and sadness