How to extract msi file

This short article shows you a tool to retrieve msi content.

A lot of replies in forums will tell you msi will run to install itself when you double click it. But what if the msi check for unnecessary requirement like this one


Are you going to install Windows XP and run this again?

So I was searching it further then I got this command. Well it run but could not find any file after that.

msiexec /a DotNetDevTrainingSetup.msi /qb TARGETDIR=c:\temp\dotnettrainingsetup

Luckily I found a tool calls lessmsi, This tool works. I have extracted all the folders and files in proper structure.

Posted in .Net, Community | Tagged , , , | Leave a comment

The web server at url does not appear to have microsoft sharepoint foundation install

This article shows to how to resolve the error “The web server at url does not appear to have microsoft sharepoint foundation install” in SharePoint Designer

I was using SharePoint Designer to connect to my SharePoint 2013 without problem. Suddenly in one morning I received the error “The web server at url does not appear to have microsoft sharepoint foundation install”.


I recalled I updated the Virus scanner, System Center Endpoint Protection, in my Windows 10.

I uninstalled System Center Endpoint Protection. This SharePoint Designer can connect to my sharePoint 2013 again.

Posted in .Net, Community, Microsoft Office | Tagged , | Leave a comment

The type or namespace name ‘IHttpActionResult’ could not be found


This short article shows you how to resolve the error “The type or namespace name ‘IHttpActionResult’ could not be found”.


If you have an ASP.NET is not create using Web API temp and you include the Web API controller in your project then you might get the following error:


Severity Code Description Project File Line Source
Error CS0246 The type or namespace name ‘IHttpActionResult’ could not be found (are you missing a using directive or an assembly reference?) WebApplication1 C:\VCShapeTemp\WebApplication1\WebApplication1\Controllers\TriviaController.cs 38 IntelliSense


You go to pull down menu choose Tools -> NuGet Package Manager -> Manage NuGet Package for Soluttion…

Search for webapi then pick the newest, I use 5.2.3.



Posted in .Net, Community | Tagged | Leave a comment

The specified file is not a valid spreadsheet or contains no data to import

This short article is repointing to with image captured from the Internet Explorer 11. In the article on the previous URL, it was IE 8 and posted 2009. Somehow Microsoft does not change the error message for better understanding the problem. 

When you add an app in Office 365 SharePoint Online, choose Import Spreadsheet then you receive an error “The specified file is not a valid spreadsheet or contains no data to import”.


Then you check you Excel file over and over again like me but there is nothing wrong with the Excel file. So I added the site into IE 11 as mentioned in the link above.

To add the link to IE 11.

1. Click Tools -> Internet Options.

2. Click Security -> click sites -> and add the URL


Posted in .Net, Community | Tagged | Leave a comment

Using Webform with Web API

This article show you how to use Webform with Web API.

I have a lot about using Webform with Web API but I have not since a good example running. Ended up I created one for myself.

I am modifying the project from Hands On Lab: Build a Single Page Application (SPA) with ASP.NET Web API and Angular.js

From what I know, banks are not a candidate for Single Page Application. Because you don’t want to lost your money because of caching and you rather make sure you refresh the whole page.

Webform still the fast way to create a web application in ASP.NET.

Let’s start try to convert this application to Webform application.

1. Download the source code form

2. Start your Visual Studio 2013 (you can use VS 2015 is fine, I have tested it).

3. Go to File -> New _> Project…

4. Choose Web -> ASP.NET Web Application, click OK.


The project name I used is GQWebform.

5. Select Web Forms and Web API, click OK.


6. Located AspNetWebApiSpa\Source\Ex2-CreatingASPAInterface\End\GeekQuiz folder in the sample that you have download.

7. Copy the following files from Models folder to Controllers folder in Web Forms project.


8. Copy TriviaController.cs from Controllers folder to Controllers folder in Web Forms project

9. Copy the following files from App_Start folder to App_Start folder in Web Forms project.


11. Copy the Global.asax and Global.asax.cs from GeekQuiz folder to Web Forms project.                          


10, Replace the Default.aspx with the following code.


<%@ Page Async=”true” Title=”Home Page” Language=”C#” MasterPageFile=”~/Site.Master” AutoEventWireup=”true” CodeBehind=”Default.aspx.cs” Inherits=”GQWebform._Default” %>


<asp:Content ID=”BodyContent” ContentPlaceHolderID=”MainContent” runat=”server”>


          <div class=”Table”>


            <div class=”Row”>


                <div class=”Cell”>

                    <p> <asp:Label ID=”Label1″ runat=”server” Text=”Label”></asp:Label></p>



                <div class=”Cell”>

                    <p><asp:RadioButtonList ID=”RadioButtonList1″ runat=”server”></asp:RadioButtonList></p>



                <div class=”Cell”>               

                    <asp:Label ID=”Label2″ runat=”server” Text=”Label”></asp:Label>



                <div class=”Cell”>

                    <p><asp:Button runat=”server” Text=”Load” OnClick=”Unnamed1_Click”></asp:Button>

                    <asp:Button ID=”btnSubmit” runat=”server” Text=”Submit” OnClick=”btnSubmit_Click” /></p>







The above code added a Label, RadioButtonList, and 2 Button in the Webform without css and javascript.

Because the code in the controllers are Async so you need to add the follow attribute to your Webform.


11. Replace the Default.aspx.cs with the following code.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using GeekQuiz.Controllers;

using GeekQuiz.Models;

using System.Threading;

using System.Threading.Tasks;


namespace WebApplication1


    public partial class _Default : Page


        TriviaQuestion nextQuestion = new TriviaQuestion();

        TriviaController triviaController = new TriviaController();

        protected void Page_Load(object sender, EventArgs e)





        public async Task<TriviaQuestion> Get()



            var userId = User.Identity.Name;


            TriviaQuestion nextQuestion = await triviaController.NextQuestionAsync(userId);


            return nextQuestion;



        protected void Unnamed1_Click(object sender, EventArgs e)





        protected async void GetNextQuestion()


            nextQuestion = await Get();


            Label1.Text = nextQuestion.Title;


            for (int i = 0; i < nextQuestion.Options.Count; i++)


                RadioButtonList1.Items.Add(new ListItem(nextQuestion.Options[i].Title, nextQuestion.Options[i].Id.ToString()));



            Session[“NQ”] = nextQuestion;



        protected void btnSubmit_Click(object sender, EventArgs e)


            TriviaAnswer answer = new TriviaAnswer();


            if (Session[“NQ”] != null)


                nextQuestion = Session[“NQ”] as TriviaQuestion;



            answer.QuestionId = nextQuestion.Id;

            answer.OptionId = int.Parse( RadioButtonList1.SelectedValue);




        protected async void SubmitAnswer(TriviaAnswer answer)


            answer.UserId = User.Identity.Name;


            Boolean isCorrect = await triviaController.StoreAsync(answer);


            Label2.Text = isCorrect.ToString();




The important code here is

protected async void GetNextQuestion()

this code calls the Async Web API in the controllers.

You can download the full solution here

Posted in .Net, Community | Tagged , , , , | Leave a comment

LocalDB Database recovering

This short article gives you the possible work around when you see your LocalDB is under recovery.

When you connected to LocalDB,, then you realized your database is gray color and status “Recovering”.


You don’t have to wait because it will never recover. The only way I get that working is login as Administrator.


Posted in .Net, Community | Tagged , | Leave a comment

Move your SharePoint Custom List from SharePoint On-Premise to Office 365 SharePoint Online

This article shows you how to move your Custom List from SharePoint On-Premise to Office 365 SharePoint Online.

In the actual fact you can use the same way to export and import the Custom List between Office 365 SharePoint Online,

This step-by-step article has 2 parts.

1.      Download the List template.

2.      Upload the List template.

Download the List template

1.      Open the Custom List you want to Export.

2.      Click List on the Ribbon.

3.      Click List Settings.


4.      Choose Save list as template under the Permissions and Management.


5.      Give the list a file name then click OK.


6.      Click the Gear on the right top and choose Site Settings.


7.      Under the Web Design Galleries, click List templates.


8.      Click FILES on the ribbon.

9.      Click Download a Copy.

10.   Give a file name to the stp file and click OK.


Upload the List template

Login to Office 365 SharePoint that you want to upload the Custom List.

1.      Go to Site Settings (same as step 6 above).

2.      Under the Web Design Galleries, click List templates (same as step 7 above).

3.      Click on Upload Document.


4.      Select the stp file then click Save.


Important: The default Site Collection you have you might not see Web Design Galleries (in my case). Create a new Site Collection.

Posted in .Net, Community, Microsoft Office | Tagged , , | Leave a comment