Android – Use AccountManager with ASP.NET Identity

User or account management is a must-have feature in business applications. For examples, one device should be used by many employees and the employees have different roles in the project. The apps must be able to authenticate user, authorize them and let them access the resources corresponding to their roles. We can manage all these things in app databases within our own tables or we can use AccountManager providing access to a centralized registry of the user’s online accounts. With AccountManager, the user enters credentials (username and password) once per account, granting applications access to online resources with “one-click” approval. In this blog post, I would like to make a small demo how we can integrate ASP.NET Identity service for authenticating user with AccountManager. I’ll only focus on addAccount part, the other functions will be discussed in other posts if necessary.

Continue reading

How to install Kali 1.0.9a on Virtual Box?

For research purposes I have to install Kali (successor of Backtrack) on Virtual Box. The installation is pretty fast however we have to know what we have to configure the VM settings and what we should choose in the installation step. I just write down these steps for my own documentation, maybe you will find it also helpful.

The most advanced penetration testing distribution, ever.
From the creators of BackTrack comes Kali Linux, the most advanced and versatile penetration testing distribution ever created. We have a whole set of amazing features lined up in our security distribution, geared at streamlining the penetration testing experience.

Continue reading

C# – WPF MVVM DataBinding 2014

It’s already 6 years since my first post about MVVM and data bindings in WPF MVVM – ListView SelectedItem and DataBinding. The MVVM pattern is now quite popular and comes into use in many WPF applications. However a lot of things have changed since 2008. We have now many new platforms where we can also apply MVVM pattern such as Windows 8 app, Windows phone app… When you use Xamarin ( to develop cross platform applications with C#, maybe you want to use MVVM pattern too. In my last post 6 years ago, I introduced to you the concept of MVVM in ‘raw’ format which means no use of any external frameworks. Today I would like to make a supplementary post by introducing 2 MVVM frameworks for easing the use of MVVM pattern. The first one is Caliburn.Micro and the second one is Mvvm Cross . They’re both open source products and can be used in any commercial applications.

Continue reading

Android – Introduction to ASP.NET Identity

Following the post C# – ASP.NET Web API and ASP.NET Identity, I would like to show how we can consume a REST web service authenticated by ASP.NET Identity within Android. In this post, we’ll repeat the steps we’ve done before in .NET client but now with Java and Android. If you follow my posts before in Android section, you must be very familiar with consuming ASP.NET Web API service. We’ll use same technique again, no big deal, however I’ll introduce some new functions in JSONHttpClient class for communication with ASP.NET Identity.

Continue reading

C# – ASP.NET Web API and ASP.NET Identity

We got to know with Google, Flickr and Twitter API service in some of my previous posts. All these provide us an authentication scheme so that we can authenticate ourselves and get permissions to 3rd party resources. We have also created our own REST web services by using ASP.NET Web API for publishing data to our clients. However, until now, our web services are all simply public to everyone. Everyone can use them, even our competitors (if there’s any) :) That’s not good and I also received questions if a web service can be protected by using authentication. So in this post I would like to make an introduction about new technology of Microsoft : The ASP.NET Identity. We’ll build a very simple REST web service with ASP.NET Web API and ASP.NET Identity from Visual Studio template and try to access it from a .NET client.

The ASP.NET Identity system is designed to replace the previous ASP.NET Membership and Simple Membership systems. It includes profile support, OAuth integration, works with OWIN, and is included with the ASP.NET templates shipped with Visual Studio 2013.

Continue reading

Android – Introduction to Parallel Computing

Handling asynchronously is a ‘must’ for all mobile applications when executing any long time operation. For example, in Android, when a network operation is going to be called, it has to be executed on other thread (not UI thread). If the developers try to run a network operation on UI thread, Android OS will force the app to stop with an exception of android.os.NetworkOnMainThreadException. As usual, the developers will put long time operation in a AsyncTask (or a Thread) and let it run. I also introduced this class in many Android posts before. However I have only one AsyncTask running at a time in all of examples. A reader asked me if I can create a list of AsyncTask and execute them at the same time. Something likes Parallel Computing? The answer is ‘Yes, of course’. We can do that in Android. Therefore, in this post, I would like to show how I simulate a multi-threading case with AsyncTask and some experimental cases for comparison between native Java and Android Java in Parallel Computing

Continue reading

Introduction to Mercurial and Bitbucket

In my recent posts, I hosted source code in Bitbucket. Bitbucket is a free code decentralized version control system (DVCS) hosting site for Git and Mercurial. In comparison to GitHub, Bitbucket allows us to host unlimited private repository for free – GitHub not. In Bitbucket, we can also integrate with other great Atlassian products for managing our development with a hosted wiki and issue tracker. Because I will host my code there in future as well as moving slowly all available .zip code files from my site to Bitbucket, I would like to write a short instruction so that you know how to check out or download the code. However I won’t go into details how Mercurial works and how great the products of Atlassian are. The topic of this blog post is very limited only in source code download section, no commit and everything else.

Continue reading

Android – How to consume an Azure Mobile Services?

Publishing core data through web service is always a work-intensive progress because we have to build up a web server, define service interface, make data access layer and implement user management. It has never been easy and always requires advanced knowledge. The resources of developers have to be distributed not only for client but also for server. Therefore the cost gets more. Moreover because of strong growth in market of smartphone and table running on different operating systems, the developers are put into a challenge to make a universal web service which can be easily consumed in all platforms. In my previous posts, such as How to call ASP.Net Web API service from Android? or Android – Media player and ASP.NET Web Api, we are able to build up a universal REST web service which can be consumed in all platforms supporting HTTP protocols.

Continue reading

Simplicity is the ultimate sophistication – Leonardo da Vinci