Self Hosting a secured ASP.Net Web API

Thursday, March 3, 2016

  Recently I had to build a self-hosted service that needs also to be contacted via SSL. I’ve found a few guides on the internet however they weren’t updated to the Owin.SelfHost so I’ve decided to write one of my own.   So, Here it is. 1, On your service you need to have a startup class, the same as you might have on your ASP.Net application.  There is nothing different between a regular and secured service. public class Startup { // This code configures Web API. The Startup class is specified as a type // parameter in the WebApp.Start method. public void Configuration(IAppBuilder appBuilder) { // Configure Web API for self-host. HttpConfiguration config =...
no comments

JSON.tryParse with Promise

Wednesday, September 9, 2015

JSON.parse is a method you must have used one or twice. And you must remember that it raises exception, as almost every parsing string in case the string comes in a wrong format. So, how about having a function that returns promise, so you can safely parse JSON's  and receive its result on the promise's "then" method. Here's some small code example: JSON.tryParse('{"a" : 1}').then(function(result) { //do something with the result }, function(error) { //do something with the error }); And here's the link to its gist:
no comments

Demos and slides of Responsive UI session

Friday, February 20, 2015

Demos and slides of Responsive UI session   Yesterday, I delivered a session about responsive UI. I wish to thank all attendees who came despite the stormy weather and hope you’veall managed to get home safely. As promised, You can all get the demo codes here You may view the slides here below or directly on SlideShare Responsive ui from Ran Wahle
no comments

Reading GPS data using exif-Js

Wednesday, January 7, 2015

Reading GPS data using exif-Js   Recently I was asked to get location data (latitude & longitude) from an image file. So I’m here to share with you exif-js library  which I came across with so I can easily read location data from an image file. EXIF stands fro Exchangeable Image file Format which is the standard for image files enables as to extract meta data from the image along with the image itself.Some of the meta data relates to the location the image was taken, assuming that it was taken with a GPS  or another location tracking...

My AngularJs workshop at Sela’s SDP

Monday, December 29, 2014

Yesterday, I delivered a full day workshop about angularJs . I wish to thank all attendees. You may view the presentation here Demo code + server side components can be downloaded here The presentation was based on Sela’s former workshop made my Moshe Levyand contained few updates.
no comments

Slide deck and demo from my signalR scale and performance session

Tuesday, December 17, 2013

Yesterday, I’ve had a session about signalR scaling and performance at Sela Develpers Practice.I want to thank all attendees. This session was rather theoretic, The code presented can be found onsignalR source code itself which can be downloaded here, you may also downloaded a subset of the LoadTestHarness built against the last releasedversion of signalR you may download it here .   Below you can view the session’s slide deck.
no comments

Page and Iframe communication with postMessages

Sunday, November 17, 2013

  I was interviewed in a company that deals with advertizing. They asked me a question I didn’t get right, seeking for a way to determine whether a commercial, located in an <iframe>, is on thevisible screen or not. So, what do you do after you don’t get the right answer to the question? Go and find it. So I did. In HTML5, on of its API is a method named postMessage. This methodenables window objects (such as iframes) to communicate with one another. With this API the solution is quite simple: When loaded ,the hosted frame can send...
one comment

Demos and Slide deck from Sela Open house

Monday, July 29, 2013

Today We held an open house at Sela when I presented SignalR  I want to thank all attendees who participate in that session.   You can download the demo code presented in that session here   You can watch the slide deck here below.   Realtime web open house from ranwahle
no comments