Friday, February 28, 2014

Create Virtual Host in IIS Server

1) Open Command Prompt using Administrative Rights

2) Flush the cache of ARP (Address resolution protocol)
a) C:\Windows\system32>netsh interface ip delete arpcache
b) C:\Windows\system32>arp -a

3) Open IE (Internet Explorer)
a) Open Internet Options window from settings
b) Click on Connections Tab -> Click on LAN Settings button
c) Uncheck all checkbox but make sure to check the "Bypass proxy server for local address."

4) Open Hosts file from C:\Windows\System32\drivers\etc Folder (Make sure is it have write permission)
It will look like this

# localhost name resolution is handled within DNS itself.
#       localhost
# ::1                 localhost

Add these lines at bottom of this file (You can add multiple names)

5) Now check is these virtual host/domain names are working
a) Go to Command Prompt and run this commands
5.a.1) ping (check is this pinging to or not)
5.a.2) tracert (check is is tracing to

6) Now open IE (Internet Explorer) OR any browser
type in address bar for first time like

It will show default localhost files (C:\inetpub\wwwroot)

7) Now Create folder in any Driver

8) Open IIS Manager
a) Click on Add Website from Connections
b) add sitename as custom domain name)
c) Select your Physical Path (You can select existed one or you can create New Folder)
d) Open Bindings from Actions and check is you domain is present, if not then add

9) Now Restart your IIS server OR your domain

10) Open browser and access you virtual host (domain name)

If the virtual host/website is not working in IE and is working in Firefox browser, then do these changes

1) Fix it by adding the necessary URLs to the list of “Local intranet” sites in Internet Explorer.

2) Go to
        “Internet Options”, under the “Security” tab,
         select “Local intranet”,
         and then click the “Sites” button near the top.

3) In the window that opens,
       click the “Advanced” button, and
       add websites to this zone,
       and then they seem to work locally.
4) This might be a simpler option for someone who only needs to access a few URLs locally.

Wednesday, February 26, 2014

Find the php.ini or php installed path in windows from command line prompt

How to find .ini file OR php path OR php version OR any other details of PHP.

If you installed  PHP  in windows directly or using webplotform installer.

Open command prompt and go to C Drive type

C:\> php -v

The result will be like this in my system, it may differ to you based on PHP version

PHP 5.4.24 (cli) (built: Jan  8 2014 20:26:10)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

C:\>php --ini

Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File:         C:\Program Files (x86)\iis express\PHP\v5.4\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

If you want search/find using particular key word you can use this command

C:\>php -i | findstr php.ini

Configuration File (php.ini) Path => C:\Windows
Loaded Configuration File => C:\Program Files (x86)\iis express\PHP\v5.4\php.ini

C:\>php -i | findstr version

System => Windows .........
iconv library version => 1.14
json version => 1.2.1
libmbfl version => 1.3.2
mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.
Multibyte regex (oniguruma) version => 4.7.1
Client API version => mysqlnd 5.0.10 - 20111026 - $Id: 2d.............. $
Client API library version => mysqlnd 5.0.10 - 20111026 - $Id: 2d........ $
Client API version => mysqlnd 5.0.10 - 20111026 - $Id: 2d................$
Phar EXT version => 2.0.1
Phar API version => 1.1.1
core library version => xmlrpc-epi v. 0.51
php extension version => 0.51
Zip version => 1.11.0
Libzip version => 0.10.1

Monday, February 17, 2014

AIOMgr: Preparing flush failed with VERR_NOT_SUPPORTED, disabling async flushes

AIOMgr: Preparing flush failed with VERR_NOT_SUPPORTED, disabling async flushes

If you get error like this while Installing Windows 8.1 as guest OS using Oracle VirtualBox/VirtualMachine

Then check your RAM Allocation for the Guest OS.

Example: First time i gave 5120 (5 GB) of RAM for Guest OS.

while installing i got the error like this in log file

AIOMgr: Preparing flush failed with VERR_NOT_SUPPORTED, disabling async flushes.

Now i changed the RAM size to 4096(4 GB), now the error gone, the guest OS installed successfully.

My Suggestion is to set RAM size in EVEN for this kind of errors.

AJAX log of Downloading Windows 8.1 os using Akamai netsession interface control panel

For every one sec (Akamai netsession interface control panel)

Request URL:,%20%27UPDATE%27,*);&r=0.02329613664187491


Tuesday, February 11, 2014

Setup environment for PhoneGap android with eclipse in Windows 7/8

1) Download 
a) JAVA from

b) APACHE ANT from (under Current Release of Ant)


* This will contain 
* Eclipse + ADT Plugin
* Android SDK Tools
* Android Platform-tools
* The latest Android platform
* The latest Android system image for the emulator

d) If you want new version of Eclipse you can download from

2) Install all Software.

3) Now we will Set up environment variables
* Follow the bellow images


Under User variables for {YOUR NAME}
JAVA_HOME     C:\Program Files\Java\jdk1.7.0_51\
Under System variables
ANDROID_HOME  E:\Downloads\adt-bundle-windows-x86_64-20131030\sdk 
        (This is my source path)

ANT_HOME      C:\apache-ant-1.9.3  (This is my source path)
PATH          {Here already have some variables along with we need add these};C:\Program Files\Java\jdk1.7.0_51\bin;C:\Program Files\Java\jre7\bin;C:\Program Files (x86)\Java\jre7\bin;%ANT_HOME%\bin;

If you are using 64 bit OS then look for java in C:\Program Files (x86)\Java\ and C:\Program       Files\Java\
After set up env variables check for is java and apache ant are working fine
Open command prompt and type bellow command

        C:\> java
here you can see all parameters.

Buildfile: build.xml does not exist!
Build failed

Don't worry Apache Ant set successfully 
5) Now install ADT Plugin in eclipse (If you installed eclipse as per (d), other wise check the installed software's in eclipse )

Download the ADT Plugin
Start Eclipse, then select Help > Install New Software.
Click Add, in the top-right corner.
In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:

        Click OK.

        If you have trouble acquiring the Plugin, try using "http" in the Location URL, instead of "https"
        (https is preferred for security reasons).

        In the Available Software dialog, select the checkbox next to Developer Tools and click Next.

        In the next window, you'll see a list of the tools to be downloaded. Click Next.

        Read and accept the license agreements, then click Finish.

        If you get a security warning saying that the authenticity or validity of the software can't be
        established, click OK.

        When the installation completes, restart Eclipse.

For more information fallow this URL

6)  Close and open Eclipse
Now you will prompt with an alert box to set the Android SDK path. Set that

7) Download phonegap from
You can use npm install if you already installed Node.js in your system. Other wise download latest zip file

8) Now create new android project
a) Follow these images


Click on New->Project->Select Android->new

The above will be the project strtucture.

b) Now go to phonegap folder  {phonegap-2.9.0\lib\android\example\assets\} copy www folder and paste it in your current android project asstes folder
c) The same for cordova jar file {phonegap-2.9.0\lib\android\example\libs\}
d) config xml file from {phonegap-2.9.0\lib\android\example\res} copy xml folder and paste in res folder of your application

9) Now click F5 in eclipse.

10) Now follow these images to Buildpath/configure jar files

   Click on Add JARs

Select Cordova jar file from and click OK button.

11) Now open file from src/ folder and do changes

a) This is before change (Do these changes.)

package com.mahesh.myfirstphonegapapp;

import android.os.Bundle;
import android.view.Menu;

public class MainActivity extends Activity {
protected void onCreate(Bundle savedInstanceState) {

public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(, menu);
return true;

b) This code after change (The bold and highlighted code is the changes)

package com.mahesh.myfirstphonegapapp;

import org.apache.cordova.*;
import android.os.Bundle;
import android.view.Menu;

public class MainActivity extends DroidGap {
public void onCreate(Bundle savedInstanceState) {

public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(, menu);
return true;

12) Now run the project as shown bellow image

13) If you already setup emulator you can use that other wise create one emulator and use it,
    OR if you want to test directly from your mobile phone, then connect your phone with data cable
and check the optin for usb debugging and install from 3rd pary software options in your phone.

Monday, January 13, 2014

The model type is invalid. please select an item from the list ( ASP.Net MVC)


If any one face this problem, hear is one solution

While creating/Add controller for Entity Framework in Asp.Net MVC3 OR MVC4

As per this website

  • Controller name: MoviesController. (This is the default. )
  • Template: Controller with read/write actions and views, using Entity Framework.
  • Model class: Movie (MvcMovie.Models).
  • Data context class: MovieDBContext (MvcMovie.Models).
  • Views: Razor (CSHTML). (The default.)

when we click on "Add" Button the application show one alert message "The model type is invalid. please select an item from the list"

Before adding MoviesController we need to built the project before proceed to this step.

Click on Run Button to built the project and now add controller with above steps.

I hope you problem will be solved.

Thursday, January 09, 2014

How to install Node.js, npm, and use them?

1 Go to and click on Install button, 
2.. Download node and install it
3.. Create an empty folder on your hard disk
     3.1) check environment path of nodejs using command prompt
            a) C:\>set %PATH%
             If it is not showing any path regarding node then set the environment path
            b) C:\>set path=%PATH%;C:\Program Files\nodejs\
4.. Create an package.json file with the following content
      Ex: C:\Program Files\nodejs\package.json
    "name": "App",
    "version": "0.0.1",
    "description": "App",
    "dependencies": {
        "": "latest"
    "author": "developer"
5.. Open windows's command prompt (press Windows key + R and type cmd)
6.. Navigate to your newly created directory with cd command
7.. Type npm install in that directory
      7.1) If you face any problem like file not found for package.json then go to nodejs path
             C:\Program Files\nodejs\ and then type npm install
8.. Wait till everything is downloaded and installed
9.. Create a file app.js with the following content:
var app = require('http').createServer(handler)
  , io = require('').listen(app)
  , fs = require('fs')


function handler (req, res) {
  fs.readFile(__dirname + '/index.html',
  function (err, data) {
    if (err) {
      return res.end('Error loading index.html');


io.sockets.on('connection', function (socket) {
  socket.emit('news', { hello: 'world' });
  socket.on('my other event', function (data) {
10.. Create a file index.html with the following content
<script src="/"></script>
  var socket = io.connect('http://localhost');
  socket.on('news', function (data) {
    socket.emit('my other event', { my: 'data' });
11.. Again, go to the command prompt (console) and type node app.js. This will run nodejs server and you may open localhost:3000