How to Change Microsoft Azure Notification Hub Price Tier

In current edition of Microsoft Azure cloud platform, when we create an Azure Notification Hub, we do not know whether we are going to be charged or not if we use the notification hub later. Because there is no an option or menu to show the price tire information to us in current Microsoft Azure Portal.

Continue reading “How to Change Microsoft Azure Notification Hub Price Tier”

Microsoft SQL Server Supports Linux

Microsoft announced a new development plan which was about SQL Server on Linux  2 days ago, which was an amazing news to all software developers. They started the plan already. The formal SQL Server on Linux will be released in Mid of 2017.

Microsoft SQL Server is the No. 3 popular database system in the world currently, It is also the No. 1 database system on Windows system. If MS SQL Server will support Linux, We guess it could be the No. 1 popular database in the world which is above Oracle and MySQL;

Please check here to get more detail information.

Release Physical Disk Space After Deleting MySql Table

(update on March 04, 2016) Our WordPress blog sites got countless junk comments often. The big amount of junk comments were saved by WordPress into database automatically and caused MySql data tables large sized.

We could delete junk comments manually, or we install some plugins to help us, for example the plugin Akismet can protect our site from spam. It is a default and recommended plugin in newer edition of WordPress. However, no matter which way, if you set you will review all comments manually, the junk comments will still occupy your database space, your data tables are still huge. So, what you can do is deleting useless comments manually one by one or use another “rude” way which is deleting all records from comments data table.

Continue reading “Release Physical Disk Space After Deleting MySql Table”

SQL Server Configuration Manager: Cannot Connect to WMI Provider, No Permission

(Note: This article copied from our sister website:


We have SQL Server Management Studio 2012 Express works well, but when we tried to launch SQL Server Configuration Manager, we got the following error message:

Cannot connect to WMI provider. You do not have permission or the server is unreachable. Note that you can only manager SQL Server 2005 and later servers with SQL Server Configuration Manager.
Invalid class [0x80041010]


Continue reading “SQL Server Configuration Manager: Cannot Connect to WMI Provider, No Permission”

Visual Studio with Git: Conflict prevents checkout

(Copied from sister website:

I had a project which developed on different computers using .NET in Visual Studio 2013, I used Git for source code control on Visual Studio online. Tehre was one computer had not updated long time. When I tried to pull code, I got the following error:

An error occurred. Detailed message: 1 conflict prevents checkout.


Continue reading “Visual Studio with Git: Conflict prevents checkout”

Microsoft: Today’s WP Apps Will Run On Future Windows Phone And Silverlight Continue To Exist

(The following content copied from

Microsoft’s Larry Lieberman recently in his blog wrote: “Today’s Windows Phone applications and games will run on the next major version of Windows Phone.

I think Microsoft should promise like this, otherwise they will lost lots of programmers. Current there are some situations let .NET programmers and Windows Phone programmers confused, they all have a question: whether they need to continue some Microsoft tech such as Silverlight and WPF since HTML5 has come, especially Windows 8 final version is also coming.

In Larry Lieberman’s old blog about “Windows 8 and the Windows Phone SDK”, he listed three main issues with running current Windows Phone SDK on Windows 8 Consumer Preview:

1: XNA Game Studio. On an attempt at installing the Windows Phone SDK, the user will receive error messages with regard to components of the XNA tool chain. These components will fail to install on Windows 8; the workaround for this has been blogged about by Aaron Stebner.

2: Windows Phone Emulator. Windows 8 cannot currently run the Windows Phone emulator, which will make it very difficult to debug your code. There are two issues in addition to the simple fact that the emulator does not run on Windows 8, having to do with specific emulator functionality.

3:.NET 3.5. Capability.exe and slsvcutil.exe will not run on Win 8 unless you separately install .NET 3.5.

However, “per the first point above”, Microsoft “will be enabling the Windows Phone SDK 7.1 on Windows 8 in the coming months.” (please read Larry Lieberman first blog about “Windows 8 and the Windows Phone SDK”)


In April 05, 2012, Larry Lieberman posted the 2nd article about “Windows 8 and the Windows Phone SDK”, the part 2.

In the new post, he gave some answers based on his 1st post.

1: Windows Phone SDK 7.1.1 Update is now available and enables Windows Phone developers to do two things: “Develop apps that work well on the new 256 MB devices, Use the WPSDK 7.1 to develop on machines running Windows 8” (see here).

2: Today’s Windows Phone applications and games will run on the next major version of Windows Phone;

3: About the long term future of Silverlight for Windows Phone: “Please don’t panic; XAML and C#/VB.NET development in Windows 8 can be viewed as a direct evolution from today’s Silverlight. All of your managed programming skills are transferrable to building applications for Windows 8, and in many cases, much of your code will be transferrable as well.”


The Best Smart Phone in 2012 ?

We don’t know what the best way to compete all kinds of smart phones is, but maybe the one reasonable way to get the result is let people vote.

Laptop Magazine, “As one of the most respected and trusted brands in mobile technology, LAPTOP Magazine & provides executive decision makers, IT professionals, and tech enthusiasts with product reviews, news and tips, trusted buying advice, and helpful how-to information. Our clarity of focus, editorial integrity, and 20 years of industry expertise make us the premiere authority on all things mobile.”, has a annual poll game named  Laptop Magazine Smart Phone Madness Game.

Laptop Magazine’s Smartphone Madness 2012 Game started from March 12, 2012,  In March 30th, Laptop Magazine announced the Smartphone Madness 2012 Finals, in the finals, there are two smart phones left, Do you know what they are ? Maybe you will be surprised. just look at the following chart:


You can see the final tow competitors are Nokia Lumia 900 and Nokia Lumia 710, which are both from Nokia, and both of them use Windows Phone OS.

The final result will come out at April 2, please check their official site here.

From the game 2012, we get to know some interesting information due to people voted:

1: Chinese Huawei Ascend D Quad is better than Apple iPhone 4s ;

2: Samsung Galaxy series is nice, it almost fight to final;

3: The best 2 makes are Nokia and Samsung;

4: Windows Phone OS came later, but looks like it is the best for consumers;

5: How about if iPhone has new models ?

6: We do not need to wait until April 2, Nokia Lumia 900 should be the final king.


Host ASP.NET Web API In WPF Application

(The following content from

Now WCF Web API changed to ASP.NET Web API. ASP.NET Web API has the feature of self-host. In Microsoft official site, they also provides two simples ASP.NET Web API self-host samples. However, they are so simple and actually they looks like the “same” one because these 2 simples are Console applications and use very similar content.

The WPF is more popular for new Windows Application solutions, so we want to find a sample that how to host ASP.NET Web API in a WPF Application. Let’s start:

First, If you have not installed ASP.NET MVC 4 (at present it is still MVC 4 beta), please go to Microsoft ASP.NET website MVC 4 part to download and install it;

After the MVC 4 stuff installed, we can write the code now.

Note: We are using Visual studio 2010.

1: Open Visual Studio 2010 as Administrator :
(Note: this step is important, you must open Visual Studio as Administrator because later we need to listen at a particular HTTP address. )


Or, if you do not want to open Visual Studio 2010 as Administrator, you must use Use Netsh.exe to give your current Windows user account permissions to reserve the URL first:

netsh http add urlacl url=http://+:8080/ user=machine\username   (check Microsoft sample here)

2: Create a WPF application, We give a project name WpfHostWebApiDemo, make sure .NET Framework 4 is selected:

(for avoiding the build errors which mentioned in the step 7, please read step 7 first, if you don’t want to do the target framework changing, you are still OK but you have to following everything descripted in step 7 later)


3: Install ASP.NET Web API Self Host package:

We will use NuGet Package Manager to install ASP.NET Web API Self Host package. Right click the project name in  in Visual Studio 2010, and choose “Manage NuGet Packages…”, If you can not see this item, it means you have not installed NuGet Package Manager for Visual Studio 2010, Please go to NuGet project site to get help information to download and install it.


About NuGet:
NuGet is a Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects that use the .NET Framework. When you add a library or tool, NuGet copies files to your solution and automatically makes whatever changes are needed in your project, such as adding references and changing your app.config or web.config file. When you remove a library, NuGet removes files and reverses whatever changes it made in your project so that no clutter is left.

When you open the Manager NuGet Packages Windows, Input “webapi selfhost” in the top right search box, The Manager can search automatically for you, You will see “ASP.NET Web API Self Host (Beta)” (Currently it is still in Beta stage) and click Install Button.


After click Install button, The install process started:


After the installation finished, click Close button to close NuGet Package Manager.

Now you can see some information in the output windows of Visual Studio 2010:

Also, you should see there are new references were added into current project:

Now we are ready to star our Web API in current project.

4: In Current project, Add a folder named Models, and add a Model class named ItemModel:

namespace WpfHostWebApiDemo.Models
    public class ItemModel
        public int ItemID { get; set; }
        public string ItemName { get; set; }
        public double ItemValue { get; set; }

5: Add a new folder named Controllers, in this folder, add a new Item, specify the template to Web API Controller Class in Web category. Give the name ItemController


Remove all generated code and add the following code into ItemController class:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Web.Http;
using WpfHostWebApiDemo.Models;

namespace WpfHostWebApiDemo.Controllers.Controllers
    public class ItemController : ApiController
        // GET /api/<controller>
        public IEnumerable<ItemModel> Get()
            return new List<ItemModel> 
                new ItemModel() { ItemID = 1, ItemName = "Item1", ItemValue = 100 },

6: Host service:

Add the windows loaded event in MainWindow, and add host service code, All MainWindow.xaml,cs file code is like the following:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Web.Http.SelfHost;
using System.Web.Http;

namespace WpfHostWebApiDemo
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
        public MainWindow()

        private void Window_Loaded(object sender, RoutedEventArgs e)
            var config = new HttpSelfHostConfiguration("http://localhost:5477");

                "API Default", "api/{controller}/{id}",
                new { id = RouteParameter.Optional });

            using (HttpSelfHostServer server = new HttpSelfHostServer(config))

                MessageBox.Show("Web API service started.");

In above code, we listen  localhost:5477, which you can change the port number to what port number you like.

7: Compile and Build project:

Now we build the project, we will see at least 5 error messages:

The type or namespace name ‘ApiController’ could not be found (are you missing a using directive or an assembly reference?)

The type or namespace name ‘SelfHost’ does not exist in the namespace ‘System.Web.Http’ (are you missing an assembly reference?)

The type or namespace name ‘HttpSelfHostConfiguration’ could not be found (are you missing a using directive or an assembly reference?)

The type or namespace name ‘HttpSelfHostServer’ could not be found (are you missing a using directive or an assembly reference?)

The type or namespace name ‘HttpSelfHostServer’ could not be found (are you missing a using directive or an assembly reference?)


The reason is current WPF project is based on the target framework ASP.NET Framework 4 Client Profile, which miss some libraries, Just right click the project name in Visual Studio 2010 and select property, and change the target framework to ASP.NET Framework 4.


After you changed the target framework to .NET Framework 4, Visual Studio 2010 will give you a message that the project need to be closed and re-open, but looks seems the Visual Studio 2010 can not re-load the project automatically, so here you should close Visual Studio manually first, and open Visual Studio 2010 as Administrator again, and load our demo project.

(Note: for avoid to re-open Visual Studio, you’d better change Target framework in step 2)

Now let us rebuild the application, we see the old error messages gone, but we get the following new errors:

The type ‘System.Web.Routing.RouteCollection’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’.

The type ‘System.Web.Routing.Route’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’.

The reason is we still missed a dll file, let’s add reference to System.Web, the version is 4.0


Now rebuild again. the build is OK now!

8: Run the Web API Service:

Click Ctrl + F5, you will see the service started message which we added in code.


Open web browser and input the URL address: localhost:5477/api/item

you will see the service content as XML format on the web page:


Now we know the Web API service is working! You can create a client to consume the service now.