<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Rajneesh Verma's Blog</title><link>http://rajneeshverma.com:80/</link><description>Learning never ends....</description><item><title>Installing &amp; Customizing Windows Terminal</title><link>http://rajneeshverma.com:80/install-customizing-windows-terminal</link><description>&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Download Windows Terminal from below link&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701?activetab=pivot:regionofsystemrequirementstab"&gt;https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701?activetab=pivot:regionofsystemrequirementstab&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Note: Make sure you are reading system requirements and its meets the criteria.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Open Window Terminal and it will be opened with default UI. As shown below&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.rajneeshverma.com/Media/Default/022/Image01.png" width="700px" alt="Install &amp;amp; Customizing Windows Terminal" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Now let&amp;rsquo;s have some customization, for that I have downloaded, few gif images which I will apply as background of each terminal.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Place the images to &lt;strong&gt;&amp;ldquo;%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState&amp;rdquo;&lt;/strong&gt; then one you want to use, I am using below 4 gif images as below&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.rajneeshverma.com/Media/Default/022/Image02.png" width="700px" alt="Install &amp;amp; Customizing Windows Terminal" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Added below section in each list item&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;"backgroundImage": "ms-appdata:///roaming/&amp;lt;Your GIF&amp;gt;",

"backgroundImageOpacity": 0.1,

"useAcrylic": true,

"fontFace": "Cascadia Code",

"acrylicOpacity": 0.9&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; To apply above settings click on down arrow -&amp;gt; Settings (Ctrl +,) it will open settings.json in an editor &lt;i&gt;(for me its VS 2019) &lt;/i&gt;&amp;nbsp;and do add code under each list item you want to customize. The result will be as below 😊&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.rajneeshverma.com/Media/Default/022/Result.gif" width="700px" alt="Install &amp;amp; Customizing Windows Terminal" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 7:&lt;/strong&gt;&amp;nbsp;If you want to change color scheme, you can add new scheme in settings.json or change the any of the available scheme &lt;em&gt;(to find available scheme, use Ctrl + ALT and click on Settings button.)&lt;/em&gt;&lt;/p&gt;</description><pubDate>Thu, 02 Jul 2020 16:13:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/install-customizing-windows-terminal</guid></item><item><title>Setting up Pi-hole in docker container using Docker for desktop</title><link>http://rajneeshverma.com:80/setting-up-pi-hole-in-container-using-docker-for-desktop</link><description>&lt;p&gt;Recently in one of our session with Microsoft I came to know &lt;i&gt;(even he shared statistics of blocked queries in his home setup)&lt;/i&gt; about &lt;a href="https://pi-hole.net/"&gt;Pi-hole&lt;/a&gt; and how it&amp;rsquo;s doing Ad blocking across all devices connected with a network. I was excited to try it out but main concern was to have a Raspberry Pi device. So I decided to try using &lt;a href="https://hub.docker.com/editions/community/docker-ce-desktop-windows/"&gt;Daemon&lt;/a&gt; &lt;i&gt;(Docker for Desktop in Windows 10)&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;Setup went smoothly as it was expected &lt;i&gt;(as I am using docker)&lt;/i&gt;. Below are the step by step details:&lt;/p&gt;
&lt;p&gt;1. First of all I spin up Daemon with Linux container &lt;i&gt;(mostly I am keeping it off and not loading on windows startup).&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;2. Downloaded pi-hole docker image from docker hub using below command &lt;i&gt;(use command window as Administrator)&lt;/i&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker pull pihole/pihole&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;3. Created below listed folders under Documents&lt;i&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; pi-hole-config&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pihole&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dnsmasq.d&lt;i&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;4. After replacing some values in Docker Run command:&lt;i&gt;&lt;/i&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;docker run -d --name pihole -p 53:53/tcp -p 53:53/udp -p 8080:80 -p 8081:443 -v "/c/Users/rajneeshk/Documents/pi-hole-config/pihole/:/etc/pihole/" -v "/c/Users/rajneeshk/Documents/pi-hole-config/dnsmasq.d/:/etc/dnsmasq.d/" -e ServerIP="192.168.1.15" -e WEBPASSWORD=admin --restart=unless-stopped pihole/pihole:latest&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;5. Values to be replaces as per environment&lt;i&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; a) Port (http/https): I have used 8080 &amp;amp; 8081 (just to avoid any collision)&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; b) Folder location(s), created in step 3.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; c) ServerIP: IP of the computer you are trying (for me it was 192.168.1.15)&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; d) WEBPASSWORD: password to access web portal (I used default as this was experimental purpose only).&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;6. Output of the command is as below:&lt;i&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.rajneeshverma.com/Media/Default/021/Download PiHole.png" width="100%" alt="Setting up Pi-hole in container using Docker for desktop" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.rajneeshverma.com/Media/Default/021/ExecutePi.png" width="100%" alt="Setting up Pi-hole in container using Docker for desktop" /&gt;&lt;/p&gt;
&lt;p&gt;7. Did browse the url : &lt;a href="http://192.168.1.15:8080/admin"&gt;http://192.168.1.15:8080/admin&lt;/a&gt; &amp;amp; it&amp;rsquo;s working &amp;nbsp;😊&lt;i&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Now we need to setup Router DNS to flow traffic through pi-hole, here again I don&amp;rsquo;t want to touch the router (Frankly I don&amp;rsquo;t have access ☹). So decided to change DNS value to consumers (my laptop &amp;amp; tv)&lt;/p&gt;
&lt;p&gt;1. Updated DNS in Laptop:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; a) Go to the Control Panel&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; b) Click Network and Internet &amp;gt; Network and Sharing Center &amp;gt; Change adapter settings&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; c) Select the connection for which you want to configure&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; d) Right-click Local Area Connection &amp;gt; Properties&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; e) Select the Networking tab&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; f) Select Internet Protocol Version 4 (TCP/IPv4) or Internet Protocol Version 6 (TCP/IPv6)&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; g) Click Properties&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; h) Click Advanced&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; i) Select the DNS tab&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; j) Click OK&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; k) Select Use the following DNS server addresses&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; l) Replce those addresses with the IP addresses of your Pi &lt;i&gt;(in my case its 192.168.1.15)&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;2. Same way I have updated to my LG TV&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; a) Refer &lt;a href="https://www.smartydns.com/support/how-to-set-up-smart-dns-on-lg-tv/" target="_blank"&gt;link&lt;/a&gt; for instruction&lt;/p&gt;
&lt;p&gt;Now all setup is done and the time to see in action, refreshed the portal and saw 2 devices are connected and it was surprising that almost 15% of queries are getting blocked, Have a look.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.rajneeshverma.com/Media/Default/021/Screen01.png" width="700px" alt="Setting up Pi-hole in container using Docker for desktop" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.rajneeshverma.com/Media/Default/021/Screen001.png" width="700px" alt="Setting up Pi-hole in container using Docker for desktop" /&gt;&lt;/p&gt;</description><pubDate>Fri, 26 Jun 2020 20:05:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/setting-up-pi-hole-in-container-using-docker-for-desktop</guid></item><item><title>Analyze &amp; Fix your Angular 6 code using TSLint</title><link>http://rajneeshverma.com:80/analyze-fix-your-angular-6-code-using-tslint</link><description>&lt;p&gt;&lt;a href="https://www.codeproject.com" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;As per TSLint Official site &lt;a href="https://palantir.github.io/tslint/"&gt;https://palantir.github.io/tslint/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;TSLint is an extensible static analysis tool that checks&amp;nbsp;&lt;a href="http://www.typescriptlang.org/"&gt;TypeScript&lt;/a&gt;&amp;nbsp;code for readability, maintainability, and functionality errors. It is widely supported across modern editors &amp;amp; build systems and can be customized with your own lint rules, configurations, and formatters.&lt;/p&gt;
&lt;p&gt;Develop quality code is highly desired hence it's highly recommended that, before code check-in to Source Control, do TSLint check and fix the possible errors.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Angular Applications are already integrated with TSLint, tslint.json file can be found in the root of your project&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TSLint&lt;/strong&gt; is also defined as dev dependency in &lt;strong&gt;package.json&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.rajneeshverma.com/Media/Default/020/TSLint01.jpg" width="700px" alt="Analyze &amp;amp; Fix your Angular 6 code using TSLint" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TSLint using CLI:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Angular CLI has extended support for linting, to scan the code for issues, run below command.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Ng lint&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.rajneeshverma.com/Media/Default/020/TSLint02.jpg" width="700px" alt="Analyze &amp;amp; Fix your Angular 6 code using TSLint" /&gt;&lt;/p&gt;
&lt;p&gt;You can see a list of errors in the console windows, however, it's difficult to read and fix.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;CLI also has support to auto fix the issues (most common), to scan and fix use below command.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Ng lint material-app --fix (here material-app is the name of the application)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.rajneeshverma.com/Media/Default/020/TSLint03.jpg" width="700px" alt="Analyze &amp;amp; Fix your Angular 6 code using TSLint" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; there may be few issues left which need to fix manually.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TSLint using Visual Code:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Open VS Code, click on Extensions &lt;em&gt;&lt;strong&gt;(Ctrl + Shift + X)&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Search &lt;strong&gt;TSLint&lt;/strong&gt; in the search box.&lt;/p&gt;
&lt;p&gt;Click on Install, Once Installed restart VS Code to complete the installation.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.rajneeshverma.com/Media/Default/020/TSLint04.jpg" width="700px" alt="Analyze &amp;amp; Fix your Angular 6 code using TSLint" /&gt;&lt;/p&gt;
&lt;p&gt;In the currently opened file issues will be highlighted, bring cursor on the issue and press &lt;em&gt;&lt;strong&gt;control + dot&lt;/strong&gt;&lt;/em&gt; will prompt for the options as below image.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Fix the current issue or click on &lt;strong&gt;"Fix all auto fixable options"&lt;/strong&gt; will fix all issues.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://www.rajneeshverma.com/Media/Default/020/TSLint05.jpg" width="700px" alt="Analyze &amp;amp; Fix your Angular 6 code using TSLint" /&gt;&lt;/p&gt;
&lt;p&gt;In case you want to fix using Command palette then by pressing &lt;strong&gt;Ctrl + Shift + P&lt;/strong&gt; will open the command palette, select or type &lt;strong&gt;"TSLint: Fix all auto-fixable problems"&lt;/strong&gt; command to fix all issues.&lt;/p&gt;</description><pubDate>Mon, 24 Sep 2018 21:57:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/analyze-fix-your-angular-6-code-using-tslint</guid></item><item><title>Reset username and password of IIS Server Application Pool </title><link>http://rajneeshverma.com:80/reset-iis-application-pools-username-and-password</link><description>&lt;p&gt;&lt;a href="https://www.codeproject.com" rel="tag" style="display: none;"&gt;CodeProject&lt;/a&gt;There are chances where we need to get Application Pools user name and password for further modifications such as refreshing account or changing password for the users.&lt;/p&gt;
&lt;p&gt;Below PowerShell Script will loop through all the App Pools&amp;nbsp; (excluding defaults) and will reset the same user and password again. Scripts can be easily customized to use to update password when a change occur.&lt;/p&gt;
&lt;pre class="lang-py"&gt;&lt;code&gt;# Check if appcmd.exe exists in default path
if (Test-Path  ("c:\windows\system32\inetsrv\appcmd.exe")) {    

	# Set AppCmd.exe path in variable for further usage.
    $AppCmdPath = 'c:\windows\system32\inetsrv\appcmd.exe'
	
    # Get list of application pools
    &amp;amp; $AppCmdPath list apppools /text:name | 
        ForEach-Object { 
                    
        #Get application pool name
        $PoolName = $_
        
        #Exclude inbuild Application Pools
        if(
        $PoolName -eq "DefaultAppPool" -Or 
        $PoolName -eq "Classic .NET AppPool" -Or 
        $PoolName -eq ".NET v2.0 Classic"-Or
        $PoolName -eq ".NET v2.0"-Or 
        $PoolName -eq ".NET v4.5 Classic" -Or
        $PoolName -eq ".NET v4.5"
        ){
            Write-Host  "Inbuild Pool" + $PoolName
        }
        else{
            #Get username                   
            $PoolUserCmd = $AppCmdPath + ' list apppool "' + $PoolName + '" /text:processmodel.username'
            $PoolUser = invoke-expression $PoolUserCmd 
                                          
            #Get password
            $PoolPasswordCmd = $AppCmdPath + ' list apppool "' + $PoolName + '" /text:processmodel.password'
            $PoolPassword = invoke-expression $PoolPasswordCmd 

            #Check if credentials exists
            if ($PoolPassword -ne "") {
                           
                #Re-set the app pool with the same credentials             
                &amp;amp; $AppCmdPath set config -section:system.applicationHost/applicationPools "/[name='$($PoolName )'].processModel.identityType:SpecificUser" "/[name='$($PoolName)'].processModel.userName:$($PoolUser)" "/[name='$($PoolName)'].processModel.password:$($PoolPassword)" 
            }
        }        
    }
    # Do IISRESET after re-setting passwords
    &amp;amp; {iisreset}   
}
else {
    Write-Host -Object 'Could not find the appcmd.exe path at default location, please try at different place.'
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Please note that PowerShell script should be executed in Administrative Privilege.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Script is available &lt;a href="https://github.com/RajneeshVerma/Reset-username-and-password-of-IIS-Server-Application-Pool" title="Reset username &amp;amp; password of IIS Server Application Pool" target="_blank"&gt;here&lt;/a&gt;&lt;/p&gt;</description><pubDate>Wed, 13 Jun 2018 08:37:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/reset-iis-application-pools-username-and-password</guid></item><item><title>Step by step guide to Setup .NET Core 1.0 development playground in Windows OS Family</title><link>http://rajneeshverma.com:80/step-by-step-guide-to-setup-net-core-1-0-development-playground-in-windows-os-family</link><description>&lt;p&gt;&lt;a style="display: none;" href="http://www.codeproject.com" rel="tag"&gt;CodeProject&lt;/a&gt;&lt;/p&gt;
&lt;!-- Go to www.addthis.com/dashboard to customize your tools --&gt;
&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;Setting up .NET Core 1.0 development playground in Windows OS Family&lt;/p&gt;
&lt;p&gt;1. Prerequisites&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; a) Windows OS, I preferred to create a Windows 10 VM in AZURE. If you want to get AZURE subscription then signup for Visual Studio Dev Essentials, Once signup you will get too many goodies free of cost including Pluralsight subscription.&lt;br /&gt;&amp;nbsp; &amp;nbsp; b) To know more about this, check below link&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.visualstudio.com/en-us/products/visual-studio-dev-essentials-vs.aspx"&gt;https://www.visualstudio.com/en-us/products/visual-studio-dev-essentials-vs.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; c) I have created a Windows 10 Enterprise N (x64) VM machine and connected using Remote Desktop from my personal laptop.&lt;br /&gt;&amp;nbsp; &amp;nbsp; d) Next is to get NodeJS from below url&lt;/p&gt;
&lt;p&gt;&lt;a href="https://nodejs.org/en/"&gt;https://nodejs.org/en/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; e) I have installed stable version of nodejs "v4.4.7 LTS" if you like to have latest then installed available latest version, now its "v6.3.0"&lt;/p&gt;
&lt;p&gt;2. Download and install VS Code latest version from below url&lt;/p&gt;
&lt;p&gt;&lt;a href="https://code.visualstudio.com/"&gt;https://code.visualstudio.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3. Install .NET CORE from below url, as we have planned to use only VS Code then I need to download and install only ".NET Core SDK for Windows".&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.microsoft.com/net/core#windows"&gt;https://www.microsoft.com/net/core#windows&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;4. Now we need to have boiler plate applications to start with, for this we have 2 options&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; a) Using Yeoman command line tool to create .NET core web application&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; b) Using Yeoman extension in VS Code.&lt;/p&gt;
&lt;p&gt;5. Let's start with command line first&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; a) Open windows command prompt as administrator and try to install prerequisites.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; b) First of all check that Node is installed properly, just run below command, command will show many options as below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;npm version&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/019/clip01.png"&gt; &lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/019/clip01.png" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; c) I am suggesting to run below command to ensure that I have latest NPM in my machine.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;npm update&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; d) Next step is to install yeoman, grunt, gulp &amp;amp; bower using npm command as below&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;npm install -g yo bower grunt-cli gulp&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;here -g denotes global, installing tools globally so that can be used for all applications&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you face error related to access then run command as Administrator.&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; e) Now we need to install aspnet generator using npm&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;npm install -g generator-aspnet&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; f) Now all prerequiste sinstalled, let's create a new directory and move to it using below commands&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mkdir MyFirstApp
cd MyFirstApp&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; g) Run below command, it will show you 7 different options to create 7 different types of applications as below:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/019/clip02.png"&gt; &lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/019/clip02.png" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; h) For Me, I have selected "Web Application" using down arrow and pressed enter, it ask me to select UI framework either "Bootstrap" or "Semantic UI", for now I have selected "Bootstrap and pressed enter.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; i) Now prompted for a name of my app, I have given as "TestApp" and clicked enter, once application created in the console it will show all necessary commands to be executed for running currently application.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/019/clip03.png"&gt; &lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/019/clip03.png" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; j) Just follow as command available&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cd TestApp - (to navigate to TestApp Application)

dotnet restore - (command to restore packages for the application)

dotnet build - (command to build the application, not mandatory to the application, once run it will be build first)

dotnet run - command to run the asp.net core 1.0 application using command&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/019/clip04.png"&gt; &lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/019/clip04.png" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; k) In the above screen you can see that application is running and it listening localhost with 5000 port, open browser and type&lt;/p&gt;
&lt;p&gt;&lt;a href="http://localhost:5000"&gt;http://localhost:5000&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; l) Our now website is running as below, once need to stop,&amp;nbsp; in command prompt pressing "Ctrl +C" will allow to shut down the application.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/019/clip05.png"&gt; &lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/019/clip05.png" alt="www.rajneeshverma.com" border="0" width="649" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;6. Let's try our second option "using Yeoman extension in VS Code"&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; a) Open Visual Studio Code, go to File - &amp;gt; Open Folder and select folder "C:\VSCode"&lt;br /&gt;&amp;nbsp; &amp;nbsp; b) Now we have to install Yeoman extension for VS Code, Press Ctrl + Shift + X will provide option to search extension from market place, put yo in search box and install yo extension once appears.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/019/clip06.png"&gt; &lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/019/clip06.png" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; c) Once installed, it will ask to Enable extension, click on it will restart VS Code.&lt;br /&gt;&amp;nbsp; &amp;nbsp; d) Again press Ctrl + Shift + X and select C# extension and install it, Once installed Enabled and restart VSCode.&lt;br /&gt;&amp;nbsp; &amp;nbsp; e) Now press F1 will open actions textbox, type yo and press enter.&lt;br /&gt;&amp;nbsp; &amp;nbsp; f) Next will show as below&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;aspnet Yeoman generator for ASP.NET  Core App&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; g) Now, it will show different options to select an template, select *App will again popup with other options as below.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/019/clip07.png"&gt; &lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/019/clip07.png" alt="www.rajneeshverma.com" border="0" width="726" height="498" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; h) I have selected "Web Application", it ask to select UI Framework, Selected Bootstrap and given application name as "TestAppUsingVSCode" in the next stage.&lt;br /&gt;&amp;nbsp; &amp;nbsp; i) Once project created successfully, we can see Done option in Output window.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/019/clip08.png"&gt; &lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/019/clip08.png" alt="www.rajneeshverma.com" border="0" width="727" height="450" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; j) Now click on File -&amp;gt; Open Folder.. and select newly created application "TestAppUsingVSCode" and click on Select Folder button.&lt;br /&gt;&amp;nbsp; &amp;nbsp; k) Now newly created application is loaded in VS Code and Once loaded there will be 2 notifications on the screen, one to restore the dependencies and other to add required assets to build and debug.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/019/clip09.png"&gt; &lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/019/clip09.png" alt="www.rajneeshverma.com" border="0" width="813" height="410" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; l) Click restore and yes for both the options.&lt;br /&gt;&amp;nbsp; &amp;nbsp; m) Once restore complete the completes status will be shown in the output window.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/019/clip10.png"&gt; &lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/019/clip10.png" alt="www.rajneeshverma.com" border="0" width="812" height="281" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; n) Now press F5 to run the application in debug mode. Application may ask to choose a browser to run the application, please select one you want to run the application. For me I have chosen Edge browser.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/019/clip11.png"&gt; &lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/019/clip11.png" alt="www.rajneeshverma.com" border="0" width="811" height="518" /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Tue, 23 Aug 2016 12:19:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/step-by-step-guide-to-setup-net-core-1-0-development-playground-in-windows-os-family</guid></item><item><title>Developing Universal Windows Apps using Widows 10 &amp; Visual Studio 2015</title><link>http://rajneeshverma.com:80/developing-universal-windows-apps-using-widows-10-visual-studio-2015</link><description>&lt;p&gt;&lt;a style="display: none;" href="http://www.codeproject.com" rel="tag"&gt;CodeProject&lt;/a&gt;&lt;/p&gt;
&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;To start Universal App development in windows 10 you need to have windows 10 OS, and visual studio 2015. Windows 10 is free for upgrade from any of win 7, 8 or 8.1 licensed operating systems.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;To upgrade follow below link.&lt;br /&gt;&lt;a href="http://www.dotnetworm.com/To%20upgrade%20follow%20below%20link.%20%20https://www.microsoft.com/en-in/windows/windows-10-upgrade" target="_blank"&gt;https://www.microsoft.com/en-in/windows/windows-10-upgrade&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Visual Studio is latest IDE for developing UWP Apps with lots of improvement over Visual Studio 2013. Visual Studio 2015 Community edition is freely available for individual developers, open source projects, academic research, education, and small professional teams.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Download it from&lt;br /&gt;&lt;a href="https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx" target="_blank"&gt;https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Once you are installing Visual Studio 2015 make sure you have selected custom installation type and choose &lt;em&gt;"Universal Windows App Development Tools"&lt;/em&gt; from custom installer windows. As shown in below image.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/018/UWA.png"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/018/UWA.png" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A Universal Windows Platform (UWP) app can run on any Windows-based device, ranging from an IoT, HoloLens, SurfaceHub, XBox to your phone, tablet or PC.&lt;/p&gt;
&lt;p&gt;UWP is designed to create a user interface that suits with different display sizes. You can use the same code and design for all devices, and you can also tailor the user interface for specific screen sizes. For example, you can design an interface that works great for tablets and PCs and create a customized experience for mobile devices, while still reusing most of your code.&lt;/p&gt;
&lt;p&gt;UWP will works on the principle of Adaptive UI, Natural user inputs, One SDK, One Store and Cloud optimized services.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/018/OneWindows.png"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/018/OneWindows.png" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;UWP will give best developer experience with Windows 10, but it can be developed on Windows 8, 8.1 and even with windows 7 with limited features. Supported features for individual OS's are as below&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/018/SupportedOS.png"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/018/SupportedOS.png" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;1. Adaptive UI:&lt;/strong&gt;&lt;/em&gt; Each device has their own set of user inputs and screen resolution, DPI density and other device specific characteristics. To develop a UWP it&amp;rsquo;s mandatory that application will have similar UI experience in all the devices, for the same purpose Windows 10 provides new universal controls, layout panels, and tooling to help you adapt your UI to the devices your app may run on. For example, you can tailor the UI to take advantage of the difference in screen resolution when your app is running on a desktop computer versus on a mobile device.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;em&gt;&lt;strong&gt;a) Responsive Design:&lt;/strong&gt;&lt;/em&gt; in UWP most of the controls have basic responsiveness and able to change the behavior based on device resolution, for e.g. a Pivot control will have selected item in left most area in mobile device but it will be in their position in desktop.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/018/ResponsiveUI.gif"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/018/ResponsiveUI.gif" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;em&gt;&lt;strong&gt;b) Adaptive Design:&amp;nbsp;&lt;/strong&gt;&lt;/em&gt;A small layout adjustment has large impact in the visualization, Features like visual states and adaptive triggers are playing major role to create Adaptive design applications.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"&amp;gt;
        &amp;lt;VisualStateManager.VisualStateGroups&amp;gt;
            &amp;lt;VisualStateGroup x:Name="VisualStateGroup"&amp;gt;
                &amp;lt;VisualState x:Name="_720pxState"&amp;gt;
                    &amp;lt;VisualState.StateTriggers&amp;gt;
                        &amp;lt;AdaptiveTrigger MinWindowWidth="100"/&amp;gt;
                    &amp;lt;/VisualState.StateTriggers&amp;gt;
                    &amp;lt;VisualState.Setters&amp;gt;
                        &amp;lt;Setter Target="image.(UIElement.Opacity)" Value="1"/&amp;gt;
                        &amp;lt;Setter Target="image.(FrameworkElement.Width)" Value="NaN"/&amp;gt;
                        &amp;lt;Setter Target="image.(FrameworkElement.HorizontalAlignment)" Value="Stretch"/&amp;gt;
                        &amp;lt;Setter Target="image.(FrameworkElement.Margin)"&amp;gt;
                            &amp;lt;Setter.Value&amp;gt;
                                &amp;lt;Thickness&amp;gt;10,10,10,0&amp;lt;/Thickness&amp;gt;
                            &amp;lt;/Setter.Value&amp;gt;
                        &amp;lt;/Setter&amp;gt;
                        &amp;lt;Setter Target="image.(Image.Stretch)" Value="UniformToFill"/&amp;gt;
                        &amp;lt;Setter Target="textBlock.(UIElement.Opacity)" Value="1"/&amp;gt;
                        &amp;lt;Setter Target="textBlock.(TextBlock.FontSize)" Value="18.667"/&amp;gt;
                        &amp;lt;Setter Target="textBlock.(TextBlock.FontFamily)"&amp;gt;
                            &amp;lt;Setter.Value&amp;gt;
                                &amp;lt;FontFamily&amp;gt;Arial Black&amp;lt;/FontFamily&amp;gt;
                            &amp;lt;/Setter.Value&amp;gt;
                        &amp;lt;/Setter&amp;gt;
                        &amp;lt;Setter Target="textBlock.(TextBlock.FontWeight)"&amp;gt;
                            &amp;lt;Setter.Value&amp;gt;
                                &amp;lt;FontWeight&amp;gt;Bold&amp;lt;/FontWeight&amp;gt;
                            &amp;lt;/Setter.Value&amp;gt;
                        &amp;lt;/Setter&amp;gt;
                        &amp;lt;Setter Target="textBlock.(FrameworkElement.Margin)"&amp;gt;
                            &amp;lt;Setter.Value&amp;gt;
                                &amp;lt;Thickness&amp;gt;10,0,10,222&amp;lt;/Thickness&amp;gt;
                            &amp;lt;/Setter.Value&amp;gt;
                        &amp;lt;/Setter&amp;gt;
                        &amp;lt;Setter Target="textBlock1.(UIElement.Opacity)" Value="1"/&amp;gt;
                        &amp;lt;Setter Target="textBlock1.(FrameworkElement.Height)" Value="247"/&amp;gt;
                        &amp;lt;Setter Target="textBlock1.(FrameworkElement.Margin)"&amp;gt;
                            &amp;lt;Setter.Value&amp;gt;
                                &amp;lt;Thickness&amp;gt;10,0,10,10&amp;lt;/Thickness&amp;gt;
                            &amp;lt;/Setter.Value&amp;gt;
                        &amp;lt;/Setter&amp;gt;
                        &amp;lt;Setter Target="image.(FrameworkElement.Height)" Value="217"/&amp;gt;
                        &amp;lt;Setter Target="textBlock.(FrameworkElement.VerticalAlignment)" Value="Bottom"/&amp;gt;
                        &amp;lt;Setter Target="textBlock.(FrameworkElement.Height)" Value="60"/&amp;gt;
                        &amp;lt;Setter Target="textBlock1.(TextBlock.FontSize)" Value="13.333"/&amp;gt;
                    &amp;lt;/VisualState.Setters&amp;gt;
                &amp;lt;/VisualState&amp;gt;
                &amp;lt;VisualState x:Name="_1024pxState"&amp;gt;
                    &amp;lt;VisualState.StateTriggers&amp;gt;
                        &amp;lt;AdaptiveTrigger MinWindowWidth="701"/&amp;gt;
                    &amp;lt;/VisualState.StateTriggers&amp;gt;
                    &amp;lt;VisualState.Setters&amp;gt;
                        &amp;lt;Setter Target="image.(UIElement.Opacity)" Value="1"/&amp;gt;
                        &amp;lt;Setter Target="image.(FrameworkElement.Width)" Value="400"/&amp;gt;
                        &amp;lt;Setter Target="image.(FrameworkElement.HorizontalAlignment)" Value="Left"/&amp;gt;
                        &amp;lt;Setter Target="image.(FrameworkElement.Margin)"&amp;gt;
                            &amp;lt;Setter.Value&amp;gt;
                                &amp;lt;Thickness&amp;gt;10,10,10,0&amp;lt;/Thickness&amp;gt;
                            &amp;lt;/Setter.Value&amp;gt;
                        &amp;lt;/Setter&amp;gt;
                        &amp;lt;Setter Target="image.(Image.Stretch)" Value="UniformToFill"/&amp;gt;
                        &amp;lt;Setter Target="textBlock.(UIElement.Opacity)" Value="1"/&amp;gt;
                        &amp;lt;Setter Target="textBlock.(TextBlock.FontSize)" Value="32"/&amp;gt;
                        &amp;lt;Setter Target="textBlock.(TextBlock.FontFamily)"&amp;gt;
                            &amp;lt;Setter.Value&amp;gt;
                                &amp;lt;FontFamily&amp;gt;Arial Black&amp;lt;/FontFamily&amp;gt;
                            &amp;lt;/Setter.Value&amp;gt;
                        &amp;lt;/Setter&amp;gt;
                        &amp;lt;Setter Target="textBlock.(TextBlock.FontWeight)"&amp;gt;
                            &amp;lt;Setter.Value&amp;gt;
                                &amp;lt;FontWeight&amp;gt;Bold&amp;lt;/FontWeight&amp;gt;
                            &amp;lt;/Setter.Value&amp;gt;
                        &amp;lt;/Setter&amp;gt;
                        &amp;lt;Setter Target="textBlock.(FrameworkElement.Margin)"&amp;gt;
                            &amp;lt;Setter.Value&amp;gt;
                                &amp;lt;Thickness&amp;gt;438,75,10,0&amp;lt;/Thickness&amp;gt;
                            &amp;lt;/Setter.Value&amp;gt;
                        &amp;lt;/Setter&amp;gt;
                        &amp;lt;Setter Target="textBlock1.(UIElement.Opacity)" Value="1"/&amp;gt;
                        &amp;lt;Setter Target="textBlock1.(FrameworkElement.Height)" Value="NaN"/&amp;gt;
                        &amp;lt;Setter Target="textBlock1.(FrameworkElement.Margin)"&amp;gt;
                            &amp;lt;Setter.Value&amp;gt;
                                &amp;lt;Thickness&amp;gt;436,181,0,57&amp;lt;/Thickness&amp;gt;
                            &amp;lt;/Setter.Value&amp;gt;
                        &amp;lt;/Setter&amp;gt;
                        &amp;lt;Setter Target="image.(FrameworkElement.Height)" Value="400"/&amp;gt;
                        &amp;lt;Setter Target="textBlock.(FrameworkElement.VerticalAlignment)" Value="Top"/&amp;gt;
                        &amp;lt;Setter Target="textBlock.(FrameworkElement.Height)" Value="60"/&amp;gt;
                        &amp;lt;Setter Target="textBlock1.(TextBlock.FontSize)" Value="16"/&amp;gt;
                        &amp;lt;Setter Target="textBlock1.(Grid.Row)" Value="0"/&amp;gt;
                        &amp;lt;Setter Target="textBlock1.(Grid.RowSpan)" Value="1"/&amp;gt;
                        &amp;lt;Setter Target="textBlock1.(Grid.ColumnSpan)" Value="1"/&amp;gt;
                        &amp;lt;Setter Target="textBlock1.(Grid.Column)" Value="0"/&amp;gt;
                        &amp;lt;Setter Target="image.(Grid.RowSpan)" Value="1"/&amp;gt;
                        &amp;lt;Setter Target="image.(Grid.Row)" Value="0"/&amp;gt;
                        &amp;lt;Setter Target="image.(Grid.Column)" Value="0"/&amp;gt;
                        &amp;lt;Setter Target="textBlock1.(FrameworkElement.HorizontalAlignment)" Value="Left"/&amp;gt;
                        &amp;lt;Setter Target="textBlock1.(FrameworkElement.VerticalAlignment)" Value="Stretch"/&amp;gt;
                        &amp;lt;Setter Target="textBlock1.(FrameworkElement.Width)" Value="834"/&amp;gt;
                        &amp;lt;Setter Target="textBlock.(FrameworkElement.HorizontalAlignment)" Value="Stretch"/&amp;gt;
                        &amp;lt;Setter Target="textBlock.(FrameworkElement.Width)" Value="NaN"/&amp;gt;
                    &amp;lt;/VisualState.Setters&amp;gt;
                &amp;lt;/VisualState&amp;gt;
            &amp;lt;/VisualStateGroup&amp;gt;
        &amp;lt;/VisualStateManager.VisualStateGroups&amp;gt;
        &amp;lt;TextBlock x:Name="textBlock" Height="60" Margin="10,0,10,10" Opacity="0" TextWrapping="Wrap" Text="Holographic computing is here." VerticalAlignment="Bottom" d:LayoutOverrides="LeftPosition, RightPosition"/&amp;gt;
        &amp;lt;Image x:Name="image" HorizontalAlignment="Center" Height="330" Margin="10,209,0,0" Opacity="0" VerticalAlignment="Top" Width="100" d:LayoutOverrides="VerticalAlignment, TopMargin, BottomMargin, LeftPosition, RightPosition" Source="Images/HoloLens.jpg"/&amp;gt;
        &amp;lt;TextBlock x:Name="textBlock1" Height="187" Margin="10,0,10,10" Opacity="0" TextWrapping="Wrap" VerticalAlignment="Bottom" d:LayoutOverrides="LeftMargin, RightMargin, TopPosition, BottomPosition"&amp;gt;
            &amp;lt;Run Text="Microsoft HoloLens is the first fully untethered, see-through holographic computer. It enables highMicrosoft HoloLens is the first fully untethered, see-through holographic computer. It enables high-definition holograms to come to life in your world, seamlessly integrating with your physical places, spaces, and things. We call this experience mixed reality. Holograms mixed with your real world will unlock all-new ways to create, communicate, work, and play.-definition holograms to come to life in your world, seamlessly integrating with your physical places, spaces, and things. We call this experience mixed reality. Holograms mixed with your real world will unlock all-new ways to create, communicate, work, and play.Windows Holographic is a mixed reality[1] computing platform[2] by Microsoft, enabling applications in which the live presentation of physical real-world elements is incorporated with that of virtual elements (referred to as "holograms" by Microsoft[3][4][5][note 1]) such that they are perceived to exist together in a shared environment. A variant of Windows for augmented reality computers[1] (which augment a real-world physical environment with virtual elements[3]) Windows Holographic features an augmented-reality operating environment in which any Universal Windows App can run. In addition, with Holographic APIs, which are part of the Universal Windows Platform, and supported as standard in Windows 10 (including versions for mobile devices and Xbox One), mixed reality features can be readily implemented in any Universal Windows App, for a wide range of Windows 10-based devices.[6][note 2]"/&amp;gt;
            &amp;lt;LineBreak/&amp;gt;
            &amp;lt;Run/&amp;gt;
            &amp;lt;LineBreak/&amp;gt;
            &amp;lt;Run Text="Microsoft announced Windows Holographic at its "Windows 10: The Next Chapter" press event on January 21, 2015.[7] It is set to be introduced as part of the general rollout of Windows 10, and showcased in the smart glasses headset Microsoft HoloLens. The Windows 10 launch begins in summer 2015 with release of the PC version, with HoloLens to be released sometime after."/&amp;gt;
        &amp;lt;/TextBlock&amp;gt;
    &amp;lt;/Grid&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Output will be as below (Desktop &amp;amp; a mobile device)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/018/AdaptiveUIDesktop.png"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/018/AdaptiveUIDesktop.png" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/018/AdaptiveUIMobile.png"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/018/AdaptiveUIMobile.png" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;em&gt;&lt;strong&gt;c) Tailored design:&lt;/strong&gt;&lt;/em&gt; In the places where Adaptive Ui and responsive controls are not able to full fill the requirement then a tailored (specific UI page for specific device family) page is the best choice. For tailored sample I have created an other MainPage.xaml inside DeviceFamily-Desktop, Make sure xaml file name as well as folder name should be same else runtime will not able to identify the page to be loaded.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/018/TailoredUI-Source.png"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/018/TailoredUI-Source.png" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;output will be as below &lt;em&gt;(Desktop &amp;amp; mobile device)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/018/TailoredUI-Desktop.png"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/018/TailoredUI-Desktop.png" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/018/TailoredUI-Mobile.png"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/018/TailoredUI-Mobile.png" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Adaptive Code:&lt;/strong&gt; A windows UAP's are expected to run across all supported devices. However, in order to take advantage of specific device features they may want to target specific device families. If a developer wants to access features that are only available on one or more device families. The first step is to add a reference to the extension software development kit for the device families. Below image illustrates adding the Windows Mobile Extension SDK to support Hardware back button.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/018/AdaptiveCode.png"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/018/AdaptiveCode.png" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And in the second step developer has to add the code to check that a HardButtons (Mobile&amp;rsquo;s back button) class exists, before wiring up a handler to the back button pressed event which is specific to mobile application. As shown in below code.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public sealed partial class Page2 : Page
    {
        public Page2()
        {
            this.InitializeComponent();
            if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons"))
            {
                Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
            }
        }
 
        private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
        {
            throw new NotImplementedException();
        }
    }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Happy coding !!!&lt;/em&gt;&lt;/p&gt;</description><pubDate>Mon, 31 Aug 2015 03:00:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/developing-universal-windows-apps-using-widows-10-visual-studio-2015</guid></item><item><title>Rich HTML 5 Hybrid Mobile Apps development using Ionic SDK</title><link>http://rajneeshverma.com:80/rich-html-5-hybrid-mobile-apps-development-using-ionic-sdk</link><description>&lt;p&gt;&lt;a style="display: none;" href="http://www.codeproject.com" rel="tag"&gt;CodeProject&lt;/a&gt;&lt;/p&gt;
&lt;!-- Go to www.addthis.com/dashboard to customize your tools --&gt;
&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://ionic.io/" target="_blank"&gt;&lt;em&gt;&lt;strong&gt;Ionic&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt; is a framework which allows us to create rich HTML 5 hybrid mobile applications. Ionic SDK allows you to create iOS and Android framework applications with predefined templates.&lt;/p&gt;
&lt;p&gt;Ionic allows us to create, build and run hybrid applications using command line.&lt;/p&gt;
&lt;p&gt;There are few prerequisites to create ionic applications these are: Node.js, Cordova CLI and chrome based ripple emulator &lt;em&gt;(if you want to run the application without a physical device).&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Node.js:&lt;/strong&gt; Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, Scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.&lt;br /&gt; Download and install Node.js from official site. &lt;a href="https://nodejs.org/" target="_blank"&gt;&lt;em&gt;https://nodejs.org/&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Cordova:&lt;/strong&gt; Cordova CLI can be installed using npm command line as below&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; npm install -g cordova&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;3. Ripple Emulator (Optional):&lt;/strong&gt; Ripple is a multi-platform mobile environment emulator that is custom-tailored to mobile HTML5 application development and testing. Ripple offers the ability to look under the hood of your mobile application, giving you full visibility into what it is doing. It also allows for the use of existing tools to perform JavaScript debugging, HTML DOM inspection, automated testing, as well as multiple device and screen resolution emulation in real-time without having to redeploy the mobile application or restart the emulator.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Add Ripple Emulator from &lt;a href="https://chrome.google.com/webstore/detail/ripple-emulator-beta/geelfhphabnejjhdalkjhgipohgpdnoc" target="_blank"&gt;https://chrome.google.com/webstore/detail/ripple-emulator-beta/geelfhphabnejjhdalkjhgipohgpdnoc&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now we have installed all prerequisites and ready to install Ionic framework. To install Ionic, open console as administrator and run below command:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; npm install -g ionic&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; -g used to install ionic globally.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Once Ionic framework installed you are ready to create projects for windows, Android as well as for iOS, there are 7 predefined templates these are:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;a) tabs (Default)&lt;br /&gt;&amp;nbsp; &amp;nbsp;b) sidemenu&lt;br /&gt;&amp;nbsp; &amp;nbsp;c) maps&lt;br /&gt;&amp;nbsp; &amp;nbsp;d) salesforce&lt;br /&gt;&amp;nbsp; &amp;nbsp;e) tests&lt;br /&gt;&amp;nbsp; &amp;nbsp;f) complex-list&lt;br /&gt;&amp;nbsp; &amp;nbsp;g) blank&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; ionic start MyApp sidemenu&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here MyApp is the name of your application you want to create with sidemenu template.&lt;/p&gt;
&lt;p&gt;Console will ask to create ionic account for push notification as below&lt;/p&gt;
&lt;p&gt;Create an ionic.io account to send Push Notifications and use the Ionic View app?&lt;/p&gt;
&lt;p&gt;(Y/n): Y&lt;/p&gt;
&lt;p&gt;Say Y if you want, Y will open a browser to create an account in ionic.io&lt;/p&gt;
&lt;p&gt;&lt;a href="https://apps.ionic.io/signup" target="_blank"&gt;https://apps.ionic.io/signup&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;By giving N will complete the project creation without signup process&lt;/p&gt;
&lt;p&gt;Navigate to your application directory to add platform targets for e.g. iOS and android, you can give only one platform if you need also can be given both together&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; cd MyApp
&amp;gt;ionic platform ios android&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To run the application in ripple emulator use below command&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; ionic serve&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It may ask you to select address as&lt;/p&gt;
&lt;p&gt;Multiple addresses available.&lt;/p&gt;
&lt;p&gt;Please select which address to use by entering its number from the list below:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;a) 100.92.50.18 (Ethernet)&lt;br /&gt; &amp;nbsp; &amp;nbsp;b) localhost&lt;/p&gt;
&lt;p&gt;Address Selection: localhost&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/em&gt; If you will not see the mobile emulator then click on ripple icon in the browser tab will open ripple mission control, click on enable and in the main screen select Mobile Web, devices option will let you to choose device as your choice.&lt;/p&gt;
&lt;p&gt;Output will be as below:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/017/MobileEmulator.png"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/017/MobileEmulator.png" alt="www.rajneeshverma.com" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To build the application targeted to an platform use below command&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt;ionic build android&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To run the application on an emulator or physical device use below command&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt;ionic emulate android&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Some useful commands:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;1) start .......... Starts a new Ionic project in the specified PATH&lt;br /&gt;&amp;nbsp; &amp;nbsp;2) serve .......... Start a local development server for app dev/testing&lt;br /&gt;&amp;nbsp; &amp;nbsp;3) platform ....... Add platform target for building an Ionic app&lt;br /&gt;&amp;nbsp; &amp;nbsp;4) run ............ Run an Ionic project on a connected device&lt;br /&gt;&amp;nbsp; &amp;nbsp;5) emulate ........ Emulate an Ionic project on a simulator or emulator&lt;br /&gt;&amp;nbsp; &amp;nbsp;6) build .......... Locally build an Ionic project for a given platform&lt;br /&gt;&amp;nbsp; &amp;nbsp;7) plugin ......... Add a Cordova plugin&lt;br /&gt;&amp;nbsp; &amp;nbsp;8) upload ......... Upload an app to your Ionic account&lt;br /&gt;&amp;nbsp; &amp;nbsp;9) share .......... Share an app with a client, co-worker, friend, or customer&lt;br /&gt;&amp;nbsp; 10) lib ............ Gets Ionic library version or updates the Ionic library&lt;br /&gt;&amp;nbsp; 11) setup .......... Configure the project with a build tool (beta)&lt;br /&gt;&amp;nbsp; 12) io ............. Integrate your app with the ionic.io platform services (alpha)&lt;br /&gt;&amp;nbsp; 13) push ........... Upload APNS and GCM credentials to Ionic Push (alpha)&lt;br /&gt;&amp;nbsp; 14) config ......... Set configuration variables for your ionic app (alpha)&lt;br /&gt;&amp;nbsp; 15) browser ........ Add another browser for a platform (beta)&lt;br /&gt;&amp;nbsp; 16) service ........ Add an Ionic service package and install any required plugins&lt;br /&gt;&amp;nbsp; 17) add ............ Add an Ion, bower component, or addon to the project&lt;br /&gt;&amp;nbsp; 18) remove ......... Remove an Ion, bower component, or addon from the project&lt;br /&gt;&amp;nbsp; 19) list ........... List Ions, bower components, or addons in the project&lt;br /&gt;&amp;nbsp; 20) ions ........... List available ions to add to your project&lt;br /&gt;&amp;nbsp; 21) templates ...... List available Ionic starter templates&lt;br /&gt;&amp;nbsp; 22) info ........... List information about the users runtime environment&lt;br /&gt;&amp;nbsp; 23) help ........... Provides help for a certain command&lt;br /&gt;&amp;nbsp; 24) link ........... Sets your Ionic App ID for your project&lt;br /&gt;&amp;nbsp; 25) hooks .......... Manage your Ionic Cordova hooks&lt;br /&gt;&amp;nbsp; 26) state .......... Saves or restores state of your Ionic Application using the package.json file&lt;br /&gt;&amp;nbsp; 27) docs ........... Opens up the documentation for Ionic&lt;br /&gt;&amp;nbsp; 28) resources ...... Automatically create icon and splash screen resources (beta) Put your images in the ./resources directory, named splash or icon. Accepted file types are .png, .ai, and .psd. Icons should be 192x192 px without rounded corners. Splashscreens should be 2208x2208 px, with the image centered in the middle.&lt;/p&gt;</description><pubDate>Sun, 30 Aug 2015 02:16:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/rich-html-5-hybrid-mobile-apps-development-using-ionic-sdk</guid></item><item><title>CRUD Operation in ASP.NET MVC 4 and AngularJS</title><link>http://rajneeshverma.com:80/crud-operation-in-asp-net-mvc-4-and-angularjs</link><description>&lt;!-- Go to www.addthis.com/dashboard to customize your tools --&gt;
&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;Today we will create an ASP.NET MVC 4 Application using AngularJS and perform &lt;em&gt;&lt;strong&gt;CRUD (Create, Read, Update and Delete)&lt;/strong&gt;&lt;/em&gt; operations using &lt;em&gt;&lt;strong&gt;SPA (Single Page Application).&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s create a new MVC Application by Opening Visual Studio 2013.&lt;/p&gt;
&lt;p&gt;1. &lt;em&gt;File&lt;/em&gt; &amp;ndash;&amp;gt; &lt;em&gt;New&lt;/em&gt; &amp;ndash;&amp;gt; &lt;em&gt;Project&lt;/em&gt; &amp;ndash;&amp;gt; Select &lt;em&gt;ASP.NET Web Application&lt;/em&gt; &amp;amp; give the name as &lt;em&gt;&amp;ldquo;CRUD_AngularJS_ASPNET_MVC&amp;rdquo;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img title="CRUD Operation in ASP.NET MVC 4 and AngularJS" src="http://rajneeshverma.com/Media/Default/016/CRUD-MVC4-AngularJS-1.png" alt="CRUD Operation in ASP.NET MVC 4 and AngularJS" width="644" height="345" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;2. Click on OK will open a new window, select MVC template &amp;amp; click on Change Authentication will open a popup on this select &amp;ldquo;No Authentication&amp;rdquo; and click on OK, OK will close the windows and create a new MVC 4.0 template project.&lt;/p&gt;
&lt;p&gt;&lt;img title="CRUD Operation in ASP.NET MVC 4 and AngularJS" src="http://rajneeshverma.com/Media/Default/016/CRUD-MVC4-AngularJS-2.png" alt="CRUD Operation in ASP.NET MVC 4 and AngularJS" width="644" height="345" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;3. Create a new Model class with name as Book.cs and add below listed properties.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class Book
    {
        [Key]
        public int Id { get; set; }
        public string Title { get; set; }
        public string Author { get; set; }
        public string Publisher { get; set; }
        public string Isbn { get; set; }
    }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;4. Add new BookDBContext.cs class in the model folder and add below code.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class BookDBContext : DbContext
    {
        public DbSet&amp;lt;Book&amp;gt; book { get; set; }
    }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;5. As we need to add System.Data.Entity namespace for which we have to install EntityFramework, to install this Goto Tools -&amp;gt; NuGet Package Manager -&amp;gt; Package Manager Console. In the Package Manager Console type below command "Install-Package EntityFramework as shown below image.&lt;/p&gt;
&lt;p&gt;&lt;img title="CRUD Operation in ASP.NET MVC 4 and AngularJS" src="http://rajneeshverma.com/Media/Default/016/CRUD-MVC4-AngularJS-3.png" alt="CRUD Operation in ASP.NET MVC 4 and AngularJS" width="644" height="320" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;6. Now let's add code in HomeController to get, add, edit and delete book records. &lt;em&gt;(delete existing code)&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class HomeController : Controller
    {
        // GET: Book
        public ActionResult Index()
        {
            return View();
        }
 
        // GET: All books
        public JsonResult GetAllBooks()
        {
            using (BookDBContext contextObj = new BookDBContext())
            {
                var bookList = contextObj.book.ToList();
                return Json(bookList, JsonRequestBehavior.AllowGet);
            }
        }
        //GET: Book by Id
        public JsonResult GetBookById(string id)
        {
            using (BookDBContext contextObj = new BookDBContext())
            {
                var bookId = Convert.ToInt32(id);
                var getBookById = contextObj.book.Find(bookId);
                return Json(getBookById, JsonRequestBehavior.AllowGet);
            }
        }
        //Update Book
        public string UpdateBook(Book book)
        {
            if (book != null)
            {
                using (BookDBContext contextObj = new BookDBContext())
                {
                    int bookId = Convert.ToInt32(book.Id);
                    Book _book = contextObj.book.Where(b =&amp;gt; b.Id == bookId).FirstOrDefault();
                    _book.Title = book.Title;
                    _book.Author = book.Author;
                    _book.Publisher = book.Publisher;
                    _book.Isbn = book.Isbn;
                    contextObj.SaveChanges();
                    return "Book record updated successfully";
                }
            }
            else
            {
                return "Invalid book record";
            }
        }
        // Add book
        public string AddBook(Book book)
        {
            if (book != null)
            {
                using (BookDBContext contextObj = new BookDBContext())
                {
                    contextObj.book.Add(book);
                    contextObj.SaveChanges();
                    return "Book record added successfully";
                }
            }
            else
            {
                return "Invalid book record";
            }
        }
        // Delete book
        public string DeleteBook(string bookId)
        {
 
            if (!String.IsNullOrEmpty(bookId))
            {
                try
                {
                    int _bookId = Int32.Parse(bookId);
                    using (BookDBContext contextObj = new BookDBContext())
                    {
                        var _book = contextObj.book.Find(_bookId);
                        contextObj.book.Remove(_book);
                        contextObj.SaveChanges();
                        return "Selected book record deleted sucessfully";
                    }
                }
                catch (Exception)
                {
                    return "Book details not found";
                }
            }
            else
            {
                return "Invalid operation";
            }
        }
    }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;7. Add database connection in web.config (Database will be created using EF once we will add book data first time)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;connectionStrings&amp;gt;
    &amp;lt;add name="BookDBContext" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-CrudInAj-201412222;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-CrudInAj-201412222.mdf" /&amp;gt;
  &amp;lt;/connectionStrings&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;8. Now we have to add view markup using AngularJS directives (ng-model &amp;amp; ng-click) but before this we have to add AngularJS in our project using Package Manager Console (open PMC and write command "Install-Package AngularJS" will install AngularJS).&lt;/p&gt;
&lt;p&gt;9. Go to Scripts and create a new folder as BookScripts, under BookScripts folder create 3 new js files as Controller.js, Module.js &amp;amp; Service.js.&lt;/p&gt;
&lt;p&gt;10. Open BundleConfig.cs under App_Start and add below code.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;bundles.Add(new ScriptBundle("~/bundles/angularJS").Include(
                     "~/Scripts/angular.js"));
 
bundles.Add(new ScriptBundle("~/bundles/customJS").Include(
                     "~/Scripts/BookScripts/Module.js",
                     "~/Scripts/BookScripts/Service.js",
                     "~/Scripts/BookScripts/Controller.js"));&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;11. Open Views -&amp;gt; Shared -&amp;gt; _Layout.cshtml and add @Script.Render block in the head tag of the page.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;@Scripts.Render("~/bundles/angularJS")
@Scripts.Render("~/bundles/customJS")&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;12. Add ng-app AnularJS directive in the HTML section of the page and give name as mvcCRUDApp (removed About &amp;amp; Contact links). full page code is as below&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html ng-app="mvcCRUDApp"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;title&amp;gt;@ViewBag.Title - My ASP.NET Application&amp;lt;/title&amp;gt;
    @Scripts.Render("~/bundles/angularJS")
    @Scripts.Render("~/bundles/customJS")
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;div class="navbar navbar-inverse navbar-fixed-top"&amp;gt;
        &amp;lt;div class="container"&amp;gt;
            &amp;lt;div class="navbar-header"&amp;gt;
                &amp;lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"&amp;gt;
                    &amp;lt;span class="icon-bar"&amp;gt;&amp;lt;/span&amp;gt;
                    &amp;lt;span class="icon-bar"&amp;gt;&amp;lt;/span&amp;gt;
                    &amp;lt;span class="icon-bar"&amp;gt;&amp;lt;/span&amp;gt;
                &amp;lt;/button&amp;gt;
                @Html.ActionLink("Book Management", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
            &amp;lt;/div&amp;gt;
            &amp;lt;div class="navbar-collapse collapse"&amp;gt;
                &amp;lt;ul class="nav navbar-nav"&amp;gt;
                    &amp;lt;li&amp;gt;@Html.ActionLink("Home", "Index", "Home")&amp;lt;/li&amp;gt;
                &amp;lt;/ul&amp;gt;
                &amp;lt;p class="nav navbar-text navbar-right"&amp;gt;Hello, @User.Identity.Name!&amp;lt;/p&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="container body-content"&amp;gt;
        @RenderBody()
        &amp;lt;hr /&amp;gt;
        &amp;lt;footer&amp;gt;
            &amp;lt;p&amp;gt;&amp;copy; @DateTime.Now.Year - My ASP.NET Application&amp;lt;/p&amp;gt;
        &amp;lt;/footer&amp;gt;
    &amp;lt;/div&amp;gt;
 
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;13. Open Module.js and define angular module as below&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;var app = angular.module("mvcCRUDApp", []);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;14. Open Service.js and define functions for Add, Update, Get and Delete book functions.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;app.service("crudAJService", function ($http) {
 
    //get All Books
    this.getBooks = function () {
        return $http.get("Home/GetAllBooks");
    };
 
    // get Book by bookId
    this.getBook = function (bookId) {
        var response = $http({
            method: "post",
            url: "Home/GetBookById",
            params: {
                id: JSON.stringify(bookId)
            }
        });
        return response;
    }
 
    // Update Book 
    this.updateBook = function (book) {
        var response = $http({
            method: "post",
            url: "Home/UpdateBook",
            data: JSON.stringify(book),
            dataType: "json"
        });
        return response;
    }
 
    // Add Book
    this.AddBook = function (book) {
        var response = $http({
            method: "post",
            url: "Home/AddBook",
            data: JSON.stringify(book),
            dataType: "json"
        });
        return response;
    }
 
    //Delete Book
    this.DeleteBook = function (bookId) {
        var response = $http({
            method: "post",
            url: "Home/DeleteBook",
            params: {
                bookId: JSON.stringify(bookId)
            }
        });
        return response;
    }
});&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;15. Open Controller.js and add functions for GetAllBooks(), EditBook(), AddUpdateBook(), DeleteBook() &amp;amp; ClearFields()&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;app.controller("mvcCRUDCtrl", function ($scope, crudAJService) {
    $scope.divBook = false;
    GetAllBooks();
    //To Get all book records  
    function GetAllBooks() {
        debugger;
        var getBookData = crudAJService.getBooks();
        getBookData.then(function (book) {
            $scope.books = book.data;
        }, function () {
            alert('Error in getting book records');
        });
    }
 
    $scope.editBook = function (book) {
        var getBookData = crudAJService.getBook(book.Id);
        getBookData.then(function (_book) {
            $scope.book = _book.data;
            $scope.bookId = book.Id;
            $scope.bookTitle = book.Title;
            $scope.bookAuthor = book.Author;
            $scope.bookPublisher = book.Publisher;
            $scope.bookIsbn = book.Isbn;
            $scope.Action = "Update";
            $scope.divBook = true;
        }, function () {
            alert('Error in getting book records');
        });
    }
 
    $scope.AddUpdateBook = function () {
        var Book = {
            Title: $scope.bookTitle,
            Author: $scope.bookAuthor,
            Publisher: $scope.bookPublisher,
            Isbn: $scope.bookIsbn
        };
        var getBookAction = $scope.Action;
 
        if (getBookAction == "Update") {
            Book.Id = $scope.bookId;
            var getBookData = crudAJService.updateBook(Book);
            getBookData.then(function (msg) {
                GetAllBooks();
                alert(msg.data);
                $scope.divBook = false;
            }, function () {
                alert('Error in updating book record');
            });
        } else {
            var getBookData = crudAJService.AddBook(Book);
            getBookData.then(function (msg) {
                GetAllBooks();
                alert(msg.data);
                $scope.divBook = false;
            }, function () {
                alert('Error in adding book record');
            });
        }
    }
 
    $scope.AddBookDiv = function () {
        ClearFields();
        $scope.Action = "Add";
        $scope.divBook = true;
    }
 
    $scope.deleteBook = function (book) {
        var getBookData = crudAJService.DeleteBook(book.Id);
        getBookData.then(function (msg) {
            alert(msg.data);
            GetAllBooks();
        }, function () {
            alert('Error in deleting book record');
        });
    }
 
    function ClearFields() {
        $scope.bookId = "";
        $scope.bookTitle = "";
        $scope.bookAuthor = "";
        $scope.bookPublisher = "";
        $scope.bookIsbn = "";
    }
    $scope.Cancel = function () {
        $scope.divBook = false;
    };
});&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;16. At last open Views -&amp;gt; Home -&amp;gt; Index.cshtml and remove existing code and add code as below&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;@{
    ViewBag.Title = "Home Page";
}
&amp;lt;div ng-controller="mvcCRUDCtrl"&amp;gt;
    &amp;lt;div class="divList"&amp;gt;
        &amp;lt;p&amp;gt;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Book List&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;
        &amp;lt;table class="table table-hover"&amp;gt;
            &amp;lt;tr&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ID&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Title&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Author&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Publisher&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Isbn&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Action&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
            &amp;lt;tr ng-repeat="book in books"&amp;gt;
                &amp;lt;td&amp;gt;
                    {{book.Id}}
                &amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;
                    {{book.Title}}
                &amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;
                    {{book.Author}}
                &amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;
                    {{book.Publisher}}
                &amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;
                    {{book.Isbn}}
                &amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;
                    &amp;lt;span ng-click="editBook(book)" class="btn btn-primary"&amp;gt;Edit&amp;lt;/span&amp;gt;
                    &amp;lt;span ng-click="deleteBook(book)" class="btn btn-danger"&amp;gt;Delete&amp;lt;/span&amp;gt;
                &amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
        &amp;lt;/table&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;span ng-click="AddBookDiv()" class="btn btn-default" &amp;gt;
        Add Book
    &amp;lt;/span&amp;gt;
    &amp;lt;div ng-show="divBook"&amp;gt;
        &amp;lt;p class="divHead"&amp;gt;&amp;lt;/p&amp;gt;
        &amp;lt;table class="table"&amp;gt;
            &amp;lt;tr&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;{{Action}} Book&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt; 
            &amp;lt;tr&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Id&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;
                    &amp;lt;input type="text" disabled="disabled" ng-model="bookId" /&amp;gt;
                &amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Title&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;
                    &amp;lt;input type="text" ng-model="bookTitle" /&amp;gt;
                &amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;           
            &amp;lt;tr&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Author&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;
                    &amp;lt;input type="text" ng-model="bookAuthor" /&amp;gt;
                &amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Publisher&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;
                    &amp;lt;input type="text" ng-model="bookPublisher" /&amp;gt;
                &amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
            &amp;lt;tr&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Isbn&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;
                    &amp;lt;input type="text" ng-model="bookIsbn" /&amp;gt;
                &amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;
                &amp;lt;td &amp;gt;
                    &amp;lt;input type="button" class="btn btn-default" value="Save" ng-click="AddUpdateBook()" /&amp;gt;
                    &amp;lt;input type="button" class="btn btn-danger" value="Cancel" ng-click="Cancel()" /&amp;gt;
                &amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
        &amp;lt;/table&amp;gt;        
    &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;17. Run the application and you can Create, Read, Update &amp;amp; Delete book details.&lt;/p&gt;
&lt;p&gt;&lt;img title="CRUD Operation in ASP.NET MVC 4 and AngularJS" src="http://www.rajneeshverma.com/Media/Default/016/CRUD-MVC4-AngularJS.gif" alt="CRUD Operation in ASP.NET MVC 4 and AngularJS" width="644" height="322" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/RajneeshVerma/CRUD-MVC4-AngularJS" target="_blank"&gt;&lt;em&gt;&lt;strong&gt;Source Code&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 05 Jul 2015 03:39:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/crud-operation-in-asp-net-mvc-4-and-angularjs</guid></item><item><title>Hello World ! with AngularJS</title><link>http://rajneeshverma.com:80/hello-world-with-angularjs</link><description>&lt;!-- Go to www.addthis.com/dashboard to customize your tools --&gt;
&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;AngularJS is a JavaScript framework used to develop cross browser applications. AngularJS is open source completely free &amp;amp; working in MVC (Model, View &amp;amp; Controller) pattern.&lt;/p&gt;
&lt;p&gt;AngularJS is working on &lt;em&gt;&lt;strong&gt;ng-directives&lt;/strong&gt;&lt;/em&gt;, 3 main directives are:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;ng-app&lt;/strong&gt;&lt;/em&gt;: Directive defines the root element of the application and is typically placed near the root element of the page - e.g. on the &amp;lt;body&amp;gt; or &amp;lt;html&amp;gt; tags.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;ng-model&lt;/strong&gt;&lt;/em&gt;: Directive binds the value of HTML controls (Input, Select, Textarea) to application data.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;ng-bind&lt;/strong&gt;&lt;/em&gt;: Directive binds the application data to HTML controls/tags.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s start our first Hello World ! application using AngularJS and Visual Studio Code &lt;em&gt;(can be used any text editor even notpad but I used VS Code).&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Create a simple HTML page as below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;title&amp;gt;
            Angular JS sample Application.
        &amp;lt;/title&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        &amp;lt;h2&amp;gt;Hello World! with Angular JS.&amp;lt;/h2&amp;gt;
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Browse the page &amp;amp; it will looks like as shown below&lt;/p&gt;
&lt;p&gt;&lt;img title="http://rajneeshverma.com/Media/Default/015/AngularJS01.png" src="http://rajneeshverma.com/Media/Default/015/AngularJS01.png" alt="http://rajneeshverma.com" width="644" height="190" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;Now let&amp;rsquo;s add AngularJS file using &lt;em&gt;&lt;strong&gt;&lt;a href="https://en.wikipedia.org/wiki/Content_delivery_network" target="_blank"&gt;CDN&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;
        Angular JS sample Application.
    &amp;lt;/title&amp;gt;
    &amp;lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add ng-app directive in the HTML body tag&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;body ng-app=""&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Define ng-model to a HTML input tag and associate a userInput property to it.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;input type="text" ng-model="userInput"&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add ng-bind to a HTML label tag and assign userInput model property.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;label ng-bind="userInput"/&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Full page markup is as below&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;title&amp;gt;
            Angular JS sample Application.
        &amp;lt;/title&amp;gt;
        &amp;lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body ng-app=""&amp;gt;
        &amp;lt;h2&amp;gt;Hello World! with Angular JS.&amp;lt;/h2&amp;gt;
        Enter text here &amp;lt;input type="text" ng-model="userInput"&amp;gt;&amp;lt;br/&amp;gt;
        &amp;lt;b&amp;gt;&amp;lt;label ng-bind="userInput"/&amp;gt; &amp;lt;/b&amp;gt; with AngularJS is ready.
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once run and Enter &lt;em&gt;&lt;strong&gt;Hello World !&lt;/strong&gt;&lt;/em&gt; you will see that as soon you type text in textbox same time it getting reflected in the label tag without extra code or page refresh.&lt;/p&gt;
&lt;p&gt;&lt;img title="http://rajneeshverma.com/Media/Default/015/AngularJS02.png" src="http://rajneeshverma.com/Media/Default/015/AngularJS02.png" alt="http://rajneeshverma.com" width="670" height="267" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I used CDN to AngularJS reference and will work only with internet access, but if you need to run/work offline then download and refer local AngularJS file as below.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;title&amp;gt;
            Angular JS sample Application.
        &amp;lt;/title&amp;gt;
        &amp;lt;script src="Scripts/angular.min.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body ng-app=""&amp;gt;
        &amp;lt;h2&amp;gt;Hello World! with Angular JS.&amp;lt;/h2&amp;gt;
        Enter text here &amp;lt;input type="text" ng-model="userInput"&amp;gt;&amp;lt;br/&amp;gt;
        &amp;lt;b&amp;gt;&amp;lt;label ng-bind="userInput"/&amp;gt; &amp;lt;/b&amp;gt; with AngularJS is ready.
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/pre&gt;</description><pubDate>Sun, 14 Jun 2015 03:03:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/hello-world-with-angularjs</guid></item><item><title>Host custom domain in Microsoft Azure</title><link>http://rajneeshverma.com:80/host-custom-domain-in-microsoft-azure</link><description>&lt;!-- Go to www.addthis.com/dashboard to customize your tools --&gt;
&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;To host a custom domain make sure you have a account in Azure portal and a custom domain from any domain provider service (In my case I have a domain from &lt;a href="http://www.godaddy.com/" target="_blank"&gt;GoDaddy&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;When you creates website in Microsoft Azure portal then you will get URL as &lt;a href="http://%3Cmysite%3E.azurewebsites.net/" target="_blank"&gt;http://&amp;lt;mysite&amp;gt;.azurewebsites.net&lt;/a&gt; You can add a custom domain name with your website, This article provides step to step instruction to associate a custom domain name purchased from any third party domain provider company to Microsoft Azure.&lt;/p&gt;
&lt;p&gt;1. To get IP address of your website login to Azure management portal and select the website you want to associate a custom domain, while clicking on it will navigate to websites tab.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/014/CustomDomain01.png"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/014/CustomDomain01.png" alt="www.rajneeshverma.com" width="604" height="484" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. In the bottom tab you can see Manage Domains button. If it is not present in your case that means you are using Free hosting plan and it has to be changed to shared, basic or standard if you wish to use custom domain.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/014/CustomDomain02.jpg"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/014/CustomDomain02.jpg" alt="www.rajneeshverma.com" width="644" height="425" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3. After changing the hosting plan click on manage domains. You will see the IP address along with CNAME records of your website.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/014/CustomDomain03.jpg"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/014/CustomDomain03.jpg" alt="www.rajneeshverma.com" width="598" height="484" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;4. Before adding your domain to Azure website you have to update CNAME records from your domain from your Domain registrar control panel. (In my case i have purchased a domain from &lt;a href="http://www.godaddy.com/" target="_blank"&gt;GoDaddy&lt;/a&gt; and updated the CNAME records as below)&lt;/p&gt;
&lt;p&gt;5. Go to your domain registrar panel and select the domain you want to edit CNAME and click on Manage DNS.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/014/CustomDomain04.jpg"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/014/CustomDomain04.jpg" alt="www.rajneeshverma.com" width="644" height="419" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;6. Edit Host entry @ and associate with the IP you obtain from Azure portal, edit www CName entry with your website address and add a new entry as awverify and point this to your website address.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/014/CustomDomain05.jpg"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/014/CustomDomain05.jpg" alt="www.rajneeshverma.com" width="644" height="474" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;7. Now go back to Azure portal and select Manage Domain add your custom domain to provided textbox and click finish. You will newly added domain is listed with your website.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/014/CustomDomain06.jpg"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/014/CustomDomain06.jpg" alt="www.rajneeshverma.com" width="597" height="484" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;8. You are done with changes, just browse your website via custom domain name &lt;a href="http://www.dotnetworm.com/" target="_blank"&gt;http://www.dotnetworm.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rajneeshverma.com/Media/Default/014/CustomDomain06.jpg"&gt;&lt;img title="www.rajneeshverma.com" src="http://rajneeshverma.com/Media/Default/014/CustomDomain06.jpg" alt="www.rajneeshverma.com" width="577" height="484" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 09 Nov 2014 14:23:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/host-custom-domain-in-microsoft-azure</guid></item><item><title>OData Service using WCF Service</title><link>http://rajneeshverma.com:80/odata-service-using-wcf-service</link><description>&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://www.odata.org/" target="_blank"&gt;OData&lt;/a&gt; is a standardized protocol for creating and consuming data APIs. OData builds on core protocols like HTTP and commonly accepted methodologies like REST. The result is a uniform way to expose full-featured data APIs.&lt;/p&gt;
&lt;p&gt;OData Service enables rich querying using URI query string parameters, For e.g.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://odataservicetest/HumanResourceDataService.svc/Employees?$filter=JobTitle%20eq%20%E2%80%98Design

%20Engineer%E2%80%99" target="_blank"&gt;http://ODataServiceTest/HumanResourceDataService.svc/Employees?$filter=JobTitle eq &amp;lsquo;Design Engineer&amp;rsquo;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;More querying options are available here.&lt;/p&gt;
&lt;p&gt;For this tutorial i am using Adventure Works Database, Download is available at codeplex,&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msftdbprodsamples.codeplex.com/releases/view/55330" target="_blank"&gt; http://msftdbprodsamples.codeplex.com/releases/view/55330&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For below tutorial I used SQL Server 20008R2 with Visual Studio 2010 (.NET 4.0).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Below is the step-by-step tutorial to create a OData Service Class project.&lt;/p&gt;
&lt;p&gt;1. Download Adventure Works database and setup it in local SQL server.&lt;/p&gt;
&lt;p&gt;2. Create a new class library project &lt;em&gt;&amp;ldquo;AdventureWorks.HumanResource.DataAccess&amp;rdquo;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img title="www.rajneeshverma.com" border="0" alt="www.rajneeshverma.com" src="http://www.rajneeshverma.com/Media/Default/013/OData01.png" width="644" height="446" /&gt;&lt;/p&gt;
&lt;p&gt;3. Delete Class1.cs file&lt;/p&gt;
&lt;p&gt;&lt;img title="www.rajneeshverma.com" border="0" alt="www.rajneeshverma.com" src="http://www.rajneeshverma.com/Media/Default/013/OData02.png" width="555" height="484" /&gt;&lt;/p&gt;
&lt;p&gt;4. Right click on project in solution explorer and click Add &amp;ndash;&amp;gt; New Item, Select Data from left tree and ADO.NET Entity Data Model from right pane. Give the name as &amp;ldquo;HumanResource.edmx&amp;rdquo; and click Add.&lt;/p&gt;
&lt;p&gt;&lt;img title="www.rajneeshverma.com" border="0" alt="www.rajneeshverma.com" src="http://www.rajneeshverma.com/Media/Default/013/OData03.png" width="644" height="446" /&gt;&lt;/p&gt;
&lt;p&gt;5. In Entity Data Model wizard select Generate from database and click next.&lt;/p&gt;
&lt;p&gt;&lt;img title="www.rajneeshverma.com" border="0" alt="www.rajneeshverma.com" src="http://www.rajneeshverma.com/Media/Default/013/OData04.png" width="543" height="484" /&gt;&lt;/p&gt;
&lt;p&gt;6. Create a new connection to Adventure Works database as below.Test connect and click OK to continue.&lt;/p&gt;
&lt;p&gt;&lt;img title="www.rajneeshverma.com" border="0" alt="www.rajneeshverma.com" src="http://www.rajneeshverma.com/Media/Default/013/OData05.png" width="470" height="484" /&gt;&lt;/p&gt;
&lt;p&gt;7. You will see connection details as below&lt;/p&gt;
&lt;p&gt;&lt;img title="www.rajneeshverma.com" border="0" alt="www.rajneeshverma.com" src="http://www.rajneeshverma.com/Media/Default/013/OData06.png" width="543" height="484" /&gt;&lt;/p&gt;
&lt;p&gt;8. Now option to choose database objects for OData, for this sample I am selecting only Tables (HumanResources schema), In later tutorial I will explore views and stored procedures for OData service.&lt;/p&gt;
&lt;p&gt;&lt;img title="www.rajneeshverma.com" border="0" alt="www.rajneeshverma.com" src="http://www.rajneeshverma.com/Media/Default/013/OData07.png" width="543" height="484" /&gt;&lt;/p&gt;
&lt;p&gt;9. After clicking Finish button, VS will create Entity Diagram, for entities make sure you have proper relation between tables.&lt;/p&gt;
&lt;p&gt;&lt;img title="www.rajneeshverma.com" border="0" alt="www.rajneeshverma.com" src="http://www.rajneeshverma.com/Media/Default/013/OData08.png" width="468" height="484" /&gt;&lt;/p&gt;
&lt;p&gt;10. Build the project, DataAccess project is ready with OData.&lt;/p&gt;
&lt;p&gt;Now create a new WCF Data Service project and refer DataAccess dll in it.&lt;/p&gt;
&lt;p&gt;1. Go to solution explorer, Add &amp;ndash;&amp;gt; New Project&lt;/p&gt;
&lt;p&gt;&lt;img title="www.rajneeshverma.com" border="0" alt="www.rajneeshverma.com" src="http://www.rajneeshverma.com/Media/Default/013/OData09.png" width="644" height="446" /&gt;&lt;/p&gt;
&lt;p&gt;2. Delete Service1.svc &amp;amp; IService.cs files&lt;/p&gt;
&lt;p&gt;&lt;img title="www.rajneeshverma.com" border="0" alt="www.rajneeshverma.com" src="http://www.rajneeshverma.com/Media/Default/013/OData10.png" width="391" height="484" /&gt;&lt;/p&gt;
&lt;p&gt;3. Add &amp;ndash;&amp;gt; New Item&amp;hellip; select WCF Service and named it as &amp;ldquo;HumanResourceDataService.svc&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;img title="www.rajneeshverma.com" border="0" alt="www.rajneeshverma.com" src="http://www.rajneeshverma.com/Media/Default/013/OData11.png" width="644" height="446" /&gt;&lt;/p&gt;
&lt;p&gt;4. Add &amp;ldquo;AdventureWorks.HumanResource.DataAccess.dll&amp;rdquo; using Add Reference&amp;hellip;&lt;/p&gt;
&lt;p&gt;&lt;img title="www.rajneeshverma.com" border="0" alt="www.rajneeshverma.com" src="http://www.rajneeshverma.com/Media/Default/013/OData12.png" width="630" height="484" /&gt;&lt;/p&gt;
&lt;p&gt;5. Add below dlls reference (you can add these dlls using Manage NuGet packages)&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;a) Microsoft.Data.Edm.dll&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;b) Microsoft.Data.OData&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;c) Microsoft.Data.Services&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;d) Microsoft.Data.Services.Client&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;e) System.Spatial.dll&lt;/p&gt;
&lt;p&gt;6. HumanResourceDataService.svc.cs code is as below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using AdventureWorks.HumanResource.DataAccess;
using System.Data.Services;
using System.Data.Services.Common;
  
namespace AdventureWorks.HumanResource.WCFService
{
    public class HumanResourceDataService : DataService&amp;lt;AdventureWorks2008R2Entities&amp;gt;
    {
        public static void InitializeService(DataServiceConfiguration config)
        {
            config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
            config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3;
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;7. HumanResourceDataService.svc code is as below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;%@ ServiceHost Language="C#" Debug="true" Factory="System.Data.Services.DataServiceHostFactory, 

System.Data.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 

Service="AdventureWorks.HumanResource.WCFService.HumanResourceDataService" %&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;8. Add new endpoint for data service with webHttpBinding, code snippet will be as below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;? xml version="1.0" encoding="utf-8"?&amp;gt;
 &amp;lt;configuration&amp;gt;  
   &amp;lt;connectionStrings&amp;gt;
     &amp;lt;add name = "AdventureWorks2008R2Entities" connectionString="metadata=res://*/HumanResourceModel.csdl|

res://*/HumanResourceModel.ssdl|res://*/HumanResourceModel.msl;provider=System.Data.SqlClient;provider connection 

string=&amp;amp;quot;data source=RAJNEESH\SQLEXPRESS;initial catalog=AdventureWorks2008R2;integrated 

security=True;multipleactiveresultsets=True;App=EntityFramework&amp;amp;quot;" providerName="System.Data.EntityClient" /&amp;gt;
   &amp;lt;/connectionStrings&amp;gt;
   &amp;lt;system.web&amp;gt;
     &amp;lt;compilation debug = "true" targetFramework="4.0" /&amp;gt;
   &amp;lt;/system.web&amp;gt;
   &amp;lt;system.serviceModel&amp;gt;
      &amp;lt;behaviors&amp;gt;
        &amp;lt;serviceBehaviors&amp;gt;
          &amp;lt;behavior&amp;gt;
            &amp;lt;!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint 

above before deployment --&amp;gt;
            &amp;lt;serviceMetadata httpGetEnabled = "true" /&amp;gt;
           &amp;lt;!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false 

before deployment to avoid disclosing exception information --&amp;gt;
           &amp;lt;serviceDebug includeExceptionDetailInFaults = "false" /&amp;gt;
         &amp;lt;/behavior&amp;gt;
       &amp;lt;/serviceBehaviors&amp;gt;
     &amp;lt;/behaviors&amp;gt;
     &amp;lt;services&amp;gt;
       &amp;lt;service name = "KPMG.eAudIT.QueueService.WASHost.HumanResourceDataService" &amp;gt;
         &amp;lt;endpoint address = "" binding="webHttpBinding" bindingConfiguration="webhttpBinding" 

contract="System.Data.Services.IRequestHandler"&amp;gt;
         &amp;lt;/endpoint&amp;gt;
       &amp;lt;/service&amp;gt;
     &amp;lt;/services&amp;gt;
     &amp;lt;serviceHostingEnvironment multipleSiteBindingsEnabled = "true" /&amp;gt;
     &amp;lt;bindings&amp;gt;
       &amp;lt;webHttpBinding&amp;gt;
         &amp;lt;binding name = "webhttpBinding" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" 

maxReceivedMessageSize="2147483647" receiveTimeout="01:00:00" sendTimeout="01:00:00"&amp;gt;
           &amp;lt;readerQuotas maxDepth = "2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" 

maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /&amp;gt;
           &amp;lt;security mode = "TransportCredentialOnly" &amp;gt;
             &amp;lt;transport clientCredentialType = "Windows" /&amp;gt;
           &amp;lt;/security&amp;gt;
         &amp;lt;/binding&amp;gt;
       &amp;lt;/webHttpBinding&amp;gt;
     &amp;lt;/bindings&amp;gt;
   &amp;lt;/system.serviceModel&amp;gt;
  &amp;lt;system.webServer&amp;gt;
     &amp;lt;modules runAllManagedModulesForAllRequests = "true" /&amp;gt;
   &amp;lt;/system.webServer&amp;gt;
 &amp;lt;/configuration&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;9. WCF service is ready to host, host the service in local iis or run directly from visual studio and see the result as below.&lt;/p&gt;
&lt;p&gt;&lt;img title="www.rajneeshverma.com" border="0" alt="www.rajneeshverma.com" src="http://www.rajneeshverma.com/Media/Default/013/OData13.png" width="644" height="480" /&gt;&lt;img title="www.rajneeshverma.com" border="0" alt="www.rajneeshverma.com" src="http://www.rajneeshverma.com/Media/Default/013/OData14.png" width="644" height="375" /&gt;&lt;/p&gt;
&lt;p&gt;10. Use LINQPad to see the results and query the data.&lt;/p&gt;
&lt;p&gt;&lt;img title="www.rajneeshverma.com" border="0" alt="www.rajneeshverma.com" src="http://www.rajneeshverma.com/Media/Default/013/OData15.png" width="644" height="435" /&gt;&lt;/p&gt;
&lt;p&gt;11. Source code download from &lt;em&gt;&lt;strong&gt;&lt;a href="http://tinyurl.com/mffudtu" target="_blank"&gt;here&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;</description><pubDate>Sat, 13 Sep 2014 20:30:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/odata-service-using-wcf-service</guid></item><item><title>Sharing host folder with VMware Player</title><link>http://rajneeshverma.com:80/sharing-host-folder-with-vmware-player</link><description>&lt;!-- Go to www.addthis.com/dashboard to customize your tools --&gt;
&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;Sharing data between host and virtual machine is a common task but how?&lt;/p&gt;
&lt;p&gt;1. Go to Player &amp;ndash;&amp;gt; Manage &amp;ndash;&amp;gt; Virtual Machine Settings, It will open a new popup&lt;/p&gt;
&lt;p&gt;&lt;img title="Sharing Host folder with VMWare Player" border="0" alt="Sharing Host folder with VMWare Player" src="http://www.rajneeshverma.com/Media/Default/012/VMShare01.png" width="644" height="411" /&gt;&lt;/p&gt;
&lt;p&gt;2. Open option tab then select Shared Folders, check Always enabled, also check Map as network drive in Windows guests, then add&amp;hellip;&lt;/p&gt;
&lt;p&gt;&lt;img title="Sharing Host folder with VMWare Player" border="0" alt="Sharing Host folder with VMWare Player" src="http://www.rajneeshverma.com/Media/Default/012/VMShare02.png" width="644" height="471" /&gt;&lt;/p&gt;
&lt;p&gt;3. Click next then browse host path, the path of host folder to share and give it a name&lt;/p&gt;
&lt;p&gt;&lt;img title="Sharing Host folder with VMWare Player" border="0" alt="Sharing Host folder with VMWare Player" src="http://www.rajneeshverma.com/Media/Default/012/VMShare03.png" width="557" height="484" /&gt;&lt;/p&gt;
&lt;p&gt;4. Click next then check enable this share and click finish&lt;/p&gt;
&lt;p&gt;&lt;img title="Sharing Host folder with VMWare Player" border="0" alt="Sharing Host folder with VMWare Player" src="http://www.rajneeshverma.com/Media/Default/012/VMShare04.png" width="557" height="484" /&gt;&lt;/p&gt;
&lt;p&gt;5. Now we can see the shared location in our virtual machines os&lt;/p&gt;
&lt;p&gt;&lt;img title="Sharing Host folder with VMWare Player" border="0" alt="Sharing Host folder with VMWare Player" src="http://www.rajneeshverma.com/Media/Default/012/VMShare05.png" width="644" height="411" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Wow&amp;hellip;&lt;/strong&gt; &lt;/em&gt;now i can share the files between host operating system to my virtual machine operating system.&lt;/p&gt;</description><pubDate>Mon, 28 Jul 2014 20:27:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/sharing-host-folder-with-vmware-player</guid></item><item><title>Installing windows 8 in virtual machine using VMware Player</title><link>http://rajneeshverma.com:80/installing-windows-8-in-virtual-machine-using-vmware-player</link><description>&lt;!-- Go to www.addthis.com/dashboard to customize your tools --&gt;
&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;Today I made a plan to install Visual Studio 2014 CTP2 but how? Installer Instructions says it may not work in parallel to prior versions of Visual Studio. They recommended to install it on Virtual Machine. VM? I newer tried it and now i planned to install it on my 3 years old laptop, Lets do it together&amp;hellip;&amp;hellip;&amp;hellip;&lt;/p&gt;
&lt;p&gt;I downloaded latest (6.0.3) version of VMware Player from &lt;a href="https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_player/6_0" target="_blank"&gt;VMware&lt;/a&gt; site.&lt;/p&gt;
&lt;p&gt;1. Installed into my machine, launched it and then clicked on Create a new Virtual Machine link.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rajneeshverma.com/Media/Default/011/VMWare01.png"&gt;&lt;img title="Installing windows 8 in virtual machine 

using VMware Player" alt="Installing windows 8 in virtual machine using VMware Player" src="http://www.rajneeshverma.com/Media/Default/011/VMWare01.png" width="537" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;Browse and selected windows 8 iso image.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rajneeshverma.com/Media/Default/011/VMWare02.png"&gt;&lt;img title="Installing windows 8 in virtual machine 

using VMware Player" alt="Installing windows 8 in virtual machine using VMware Player" src="http://www.rajneeshverma.com/Media/Default/011/VMWare02.png" width="537" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3. Entered my windows 8 product key and my user name.I kept password textbox intact.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rajneeshverma.com/Media/Default/011/VMWare03.png"&gt;&lt;img title="Installing windows 8 in virtual machine 

using VMware Player" alt="Installing windows 8 in virtual machine using VMware Player" src="http://www.rajneeshverma.com/Media/Default/011/VMWare03.png" width="537" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;4. Given virtual machine name &amp;amp; used browse to select the location for VM storage.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rajneeshverma.com/Media/Default/011/VMWare04.png"&gt;&lt;img title="Installing windows 8 in virtual machine 

using VMware Player" alt="Installing windows 8 in virtual machine using VMware Player" src="http://www.rajneeshverma.com/Media/Default/011/VMWare04.png" width="537" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;5. Provided my disk storage space.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rajneeshverma.com/Media/Default/011/VMWare05.png"&gt;&lt;img title="Installing windows 8 in virtual machine 

using VMware Player" alt="Installing windows 8 in virtual machine using VMware Player" src="http://www.rajneeshverma.com/Media/Default/011/VMWare05.png" width="537" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;6. On clicking on next button it will open a new window with the details selected, click on the finish button.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rajneeshverma.com/Media/Default/011/VMWare06.png"&gt;&lt;img title="Installing windows 8 in virtual machine 

using VMware Player" alt="Installing windows 8 in virtual machine using VMware Player" src="http://www.rajneeshverma.com/Media/Default/011/VMWare06.png" width="537" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;7. While clicking on finish it starts creating the disk.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rajneeshverma.com/Media/Default/011/VMWare07.png"&gt;&lt;img title="Installing windows 8 in virtual machine 

using VMware Player" alt="Installing windows 8 in virtual machine using VMware Player" src="http://www.rajneeshverma.com/Media/Default/011/VMWare07.png" width="537" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;8. Ahhh&amp;hellip;. got the information notification message, clicked on ok button.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rajneeshverma.com/Media/Default/011/VMWare08.png"&gt;&lt;img title="Installing windows 8 in virtual machine 

using VMware Player" alt="Installing windows 8 in virtual machine using VMware Player" src="http://www.rajneeshverma.com/Media/Default/011/VMWare08.png" width="537" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;9. Got the error message with couple of options, do not know what to do next.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rajneeshverma.com/Media/Default/011/VMWare09.png"&gt;&lt;img title="Installing windows 8 in virtual machine 

using VMware Player" alt="Installing windows 8 in virtual machine using VMware Player" src="http://www.rajneeshverma.com/Media/Default/011/VMWare09.png" width="537" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;10. I caught my ultimate friend &amp;ldquo;Google&amp;rdquo; and searched&amp;hellip; finally found that I have to enable virtualization setting in my laptop&amp;rsquo;s BIOS. Lets check it&amp;hellip;.. I went to BIOS and find the Virtualization Technology under System Configuration, Enabled it and back to installation.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rajneeshverma.com/Media/Default/011/VMWare10.png"&gt;&lt;img title="Installing windows 8 in virtual machine 

using VMware Player" alt="Installing windows 8 in virtual machine using VMware Player" src="http://www.rajneeshverma.com/Media/Default/011/VMWare10.png" width="644" height="353" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;11. Now I can see windows 8 virtual machine link in left tree, while clicking it it starts virtual machine and I can see now windows 8 is getting installed.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rajneeshverma.com/Media/Default/011/VMWare11.png"&gt;&lt;img title="Installing windows 8 in virtual machine 

using VMware Player" alt="Installing windows 8 in virtual machine using VMware Player" src="http://www.rajneeshverma.com/Media/Default/011/VMWare11.png" width="644" height="427" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;12. Yes&amp;hellip; Windows 8 is installed on my virtual machine and now i can install Visual Studio 2014 CTP2.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rajneeshverma.com/Media/Default/011/VMWare12.png"&gt;&lt;img title="Installing windows 8 in virtual machine 

using VMware Player" alt="Installing windows 8 in virtual machine using VMware Player" src="http://www.rajneeshverma.com/Media/Default/011/VMWare12.png" width="644" height="342" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Thank you VMware Player, you saved my time&amp;hellip;&amp;hellip;&lt;/em&gt;&lt;/p&gt;</description><pubDate>Sun, 27 Jul 2014 20:25:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/installing-windows-8-in-virtual-machine-using-vmware-player</guid></item><item><title>Check All Check Boxes in List View with JQuery</title><link>http://rajneeshverma.com:80/check-all-check-boxes-in-list-view-with-jquery</link><description>&lt;!-- Go to www.addthis.com/dashboard to customize your tools --&gt;
&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;Hi, Its quite simple to use check all checkboxes in List view using JQuery.&lt;/p&gt;
&lt;p&gt;Use the below JQuery function to check all check boxes:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$(document).ready(function () {
           $("[id$='chkAllColor']").live('click', function () {
               $("[id$='chkColor']").attr('checked', this.checked);
           });
});&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;Designer code is as below:&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&amp;gt;
&amp;lt;head runat="server"&amp;gt;
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
    &amp;lt;script src="Scripts/jquery-1.8.0.min.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script language="javascript" type="text/javascript"&amp;gt;
        $(document).ready(function () {
            $("[id$='chkAllColor']").live('click', function () {
                $("[id$='chkColor']").attr('checked', this.checked);
            });
        });
    &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id="form1" runat="server"&amp;gt;
        &amp;lt;div&amp;gt;
            &amp;lt;asp:ListView ID="lswLoan" runat="server" ViewStateMode="Disabled" &amp;gt;
                &amp;lt;LayoutTemplate&amp;gt;
                            &amp;lt;table class="table"&amp;gt;
                                &amp;lt;tr&amp;gt;
                                    &amp;lt;th&amp;gt;
                                        &amp;lt;asp:CheckBox ID="chkAllColor" ToolTip="Select All" ClientIDMode="Static" runat="server" /&amp;gt;                                          
                                    &amp;lt;/th&amp;gt;
                                    &amp;lt;th&amp;gt;ID&amp;lt;/th&amp;gt;
                                    &amp;lt;th&amp;gt;Color&amp;lt;/th&amp;gt;                           
                                &amp;lt;/tr&amp;gt;
                                &amp;lt;tr id="itemPlaceholder" runat="server"&amp;gt;
                                &amp;lt;/tr&amp;gt;
                            &amp;lt;/table&amp;gt;
                &amp;lt;/LayoutTemplate&amp;gt;
                &amp;lt;ItemTemplate&amp;gt;
                    &amp;lt;tr&amp;gt;
                        &amp;lt;td&amp;gt;
                            &amp;lt;asp:CheckBox ID="chkColor" runat="server" ClientIDMode="Static"  /&amp;gt;
                        &amp;lt;/td&amp;gt;
                        &amp;lt;td&amp;gt;
                            &amp;lt;%# Eval("id") %&amp;gt;
                        &amp;lt;/td&amp;gt;
                        &amp;lt;td&amp;gt;
                            &amp;lt;%# Eval("color") %&amp;gt;
                        &amp;lt;/td&amp;gt;
                    &amp;lt;/tr&amp;gt;
                &amp;lt;/ItemTemplate&amp;gt;                
            &amp;lt;/asp:ListView&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;Don&amp;rsquo;t forget to use ClientIDMode="Static" for each checkbox control.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And the code behind:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString1"].ConnectionString);
   protected void Page_Load(object sender, EventArgs e)
   {
       if (!IsPostBack)
       {
           fillgrid2();
       }
   }
   private void fillgrid2()
   {
       SqlDataAdapter da = new SqlDataAdapter("select * from Table_2", con);
       DataTable dt = new DataTable();
       da.Fill(dt);
       lswLoan.DataSource = dt;
       lswLoan.DataBind();
   }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That&amp;rsquo;s it !&lt;/p&gt;
&lt;p&gt;Output is as follow:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rajneeshverma.com/Media/Default/010/CheckAllCheckboxes.gif"&gt;&lt;img title="CheckAllCheckboxes" alt="CheckAllCheckboxes" src="http://www.rajneeshverma.com/Media/Default/010/CheckAllCheckboxes.gif" width="240" height="190" /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 13 Jul 2013 20:21:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/check-all-check-boxes-in-list-view-with-jquery</guid></item><item><title>Upload large file using AjaxFileUpload Control with client-side chunking</title><link>http://rajneeshverma.com:80/upload-large-file-using-ajaxfileupload-control-with-client-side-chunking</link><description>&lt;!-- Go to www.addthis.com/dashboard to customize your tools --&gt;
&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;With the latest release of AjaxControlToolkit you can upload large file (more than 3GB) with client-side chunking. Code is still simple as it was earlier.&lt;/p&gt;
&lt;p&gt;Add ToolkitScriptManager &amp;amp; AjaxFileUpload control on page&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;ajaxToolkit:ToolkitScriptManager runat="server" /&amp;gt;  
&amp;lt;ajaxToolkit:AjaxFileUpload ID="AjaxFileUploader" OnUploadComplete="AjaxFileUploader_UploadComplete" runat="server" /&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;On UploadCompleter event set the target folder location to save file.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;protected void AjaxFileUploader_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
{
     AjaxFileUploader.SaveAs(MapPath("~/UploadedFiles/" + e.FileName));
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;To support Large files to be uploaded, need to modify Web.config. In Web.config need to add &lt;em&gt;&lt;strong&gt;&amp;ldquo;maxRequestLength&amp;rdquo;&lt;/strong&gt;&lt;/em&gt; and &lt;em&gt;&lt;strong&gt;&amp;ldquo;maxAllowedContentLength&amp;rdquo;&lt;/strong&gt;&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;configuration&amp;gt;
  &amp;lt;system.web&amp;gt;
    &amp;lt;compilation debug="true" targetFramework="4.5" /&amp;gt;
    &amp;lt;httpRuntime targetFramework="4.5" maxRequestLength="42949672" /&amp;gt;
    &amp;lt;pages&amp;gt;
      &amp;lt;controls&amp;gt;
        &amp;lt;add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /&amp;gt;
      &amp;lt;/controls&amp;gt;
    &amp;lt;/pages&amp;gt;
  &amp;lt;/system.web&amp;gt;
&amp;lt;system.webServer&amp;gt;
    &amp;lt;validation validateIntegratedModeConfiguration="false"/&amp;gt;
    &amp;lt;handlers&amp;gt;
      &amp;lt;add name="AjaxFileUploadHandler" verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/&amp;gt;
    &amp;lt;/handlers&amp;gt;
    &amp;lt;security&amp;gt;
      &amp;lt;requestFiltering&amp;gt;
        &amp;lt;requestLimits maxAllowedContentLength="4294967295"/&amp;gt;
      &amp;lt;/requestFiltering&amp;gt;
    &amp;lt;/security&amp;gt;
  &amp;lt;/system.webServer&amp;gt;
&amp;lt;/configuration&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;Now run the page and upload large file data. &lt;em&gt;(if you are using Chrome click F12 to see file is uploading with chunks)&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="http://rajneeshverma.com/Media/Default/009/AjaxFileUpload.png" alt="http://www.dotnetworm.com/Media/Default/009/AjaxFileUpload.png" width="659" height="457" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Make sure you have downloaded latest AjaxToolkit from:&lt;a href="http://ajaxcontroltoolkit.codeplex.com/" target="_blank"&gt;http://ajaxcontroltoolkit.codeplex.com/&lt;/a&gt; also you can install using NuGet command in Visual Studio 2010/12 using command &lt;em&gt;&lt;strong&gt;&amp;ldquo;INSTALL-PACKAGE AJAXCONTROLTOOLKIT&amp;rdquo;&lt;/strong&gt;&lt;/em&gt; also its mandatory to have &lt;em&gt;&lt;strong&gt;&amp;ldquo;UploadedFiles&amp;rdquo;&lt;/strong&gt;&lt;/em&gt; folder in Application root to run this application.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Supported version .net 4.0 and 4.5&lt;/p&gt;
&lt;/blockquote&gt;</description><pubDate>Wed, 01 May 2013 20:15:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/upload-large-file-using-ajaxfileupload-control-with-client-side-chunking</guid></item><item><title>Early Experts–Cloud</title><link>http://rajneeshverma.com:80/early-experts-cloud</link><description>&lt;!-- Go to www.addthis.com/dashboard to customize your tools --&gt;
&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;I participated in Windows Server 2012 "Early Experts" Challenge &amp;ndash; Cloud Quest. And on 30-March I got the &lt;em&gt;&lt;strong&gt;Early Experts &amp;ndash; Cloud&lt;/strong&gt;&lt;/em&gt; certificate in mail.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.dotnetworm.com/Media/Default/008/Early%20Experts%20Cloud.png"&gt;&lt;img title="Early Experts Cloud" border="0" alt="Early Experts Cloud" src="http://rajneeshverma.com/Media/Default/008/Early%20Experts%20Cloud.png" width="653" height="438" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you want, you can also join for Early Experts Cloud Quest using the below link and get a certificate..&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/b/keithmayer/p/earlyexpertws12_cloud.aspx" target="_blank"&gt;Windows Server 2012 "Early Experts" Challenge &amp;ndash; Cloud Quest&lt;/a&gt;&lt;/p&gt;</description><pubDate>Tue, 02 Apr 2013 20:13:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/early-experts-cloud</guid></item><item><title>List all Files and Folders of a Directory using DOS Command</title><link>http://rajneeshverma.com:80/list-all-files-and-folders-of-a-directory-using-dos-command</link><description>&lt;!-- Go to www.addthis.com/dashboard to customize your tools --&gt;
&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;Listing the Files and Folders using DOS Command is very simple and handy.&lt;/p&gt;
&lt;p&gt;Steps are as below:&lt;/p&gt;
&lt;p&gt;1. Goto Command prompt.&lt;br /&gt;2. Navigate to the Directory (Where you want to search Files).&lt;br /&gt;3. Write the command as: dir /s /b &amp;gt; c:\ListFilesFolders.txt&lt;/p&gt;
&lt;p&gt;&lt;img title="Output" border="0" alt="Output" src="http://rajneeshverma.com/Media/Default/007/DosWindow.png" width="644" height="350" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;4. Please Note: &amp;ldquo;C:\ListFilesFolders.txt&amp;rdquo; is the file path with file name.&lt;br /&gt;5. And you will see the result as below:&lt;/p&gt;
&lt;p&gt;&lt;img title="Output" border="0" alt="Output" src="http://rajneeshverma.com/Media/Default/007/Output.png" width="644" height="350" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;</description><pubDate>Fri, 22 Feb 2013 21:00:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/list-all-files-and-folders-of-a-directory-using-dos-command</guid></item><item><title>Uncheck Radio Button on Double Click</title><link>http://rajneeshverma.com:80/uncheck-radio-button-on-double-click</link><description>&lt;!-- Go to www.addthis.com/dashboard to customize your tools --&gt;
&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;Recently I got one requirement that i have to uncheck radio button list when a user double click it (Try to uncheck). I did this using JAVA Script.&lt;/p&gt;
&lt;p&gt;Below is the code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Designer:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;head runat="server"&amp;gt;
    &amp;lt;title&amp;gt; :Radio Button List Demo: &amp;lt;/title&amp;gt;
&amp;lt;script language="javascript" type="text/javascript"&amp;gt;
    //Global variable to store selectedvalue
    var lastchecked = "";
 
    function rblSelectedValue() {
        //Get the radiobuttonlist Value
        var radio = document.getElementsByName('&amp;lt;%= RadioButtonList1.ClientID %&amp;gt;');
 
        //local variable to store selected value
        var selectedvalue;
 
        //loop through the items in radiobuttonlist
        for (var j = 0; j &amp;lt; radio.length; j++) {
            if (radio[j].checked) {
                if (lastchecked == radio[j].value) {
                    radio[j].checked = false;
                    lastchecked = "";
                }
                else {
                    lastchecked = radio[j].value;
                }               
                break;
            }
        }
    }
&amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id="form1" runat="server"&amp;gt;
    &amp;lt;div&amp;gt;
        &amp;lt;asp:Label ID="Label2" runat="server" Text="How many states are in India?"&amp;gt;&amp;lt;/asp:Label&amp;gt;
        &amp;lt;br /&amp;gt;
        &amp;lt;asp:radiobuttonlist id="RadioButtonList1" onclick="rblSelectedValue()" runat="server"&amp;gt;
           &amp;lt;asp:listitem value="26"&amp;gt;Twenty Six&amp;lt;/asp:listitem&amp;gt;
           &amp;lt;asp:listitem value="28"&amp;gt;Twenty Eight&amp;lt;/asp:listitem&amp;gt;
           &amp;lt;asp:listitem value="20"&amp;gt;Twenty&amp;lt;/asp:listitem&amp;gt;
           &amp;lt;asp:listitem value="30"&amp;gt;Thirty&amp;lt;/asp:listitem&amp;gt;
       &amp;lt;/asp:radiobuttonlist&amp;gt;
        &amp;lt;br /&amp;gt;
        &amp;lt;asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Submit" /&amp;gt;
        &amp;lt;asp:Label ID="Label1" runat="server"&amp;gt;&amp;lt;/asp:Label&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;protected void Button1_Click(object sender, EventArgs e)
    {
        if (RadioButtonList1.SelectedItem != null)
        {
            if (RadioButtonList1.SelectedItem.Value=="28")
            {
                Label1.ForeColor = System.Drawing.ColorTranslator.FromHtml("Green");
                Label1.Text = "You have selected :" + RadioButtonList1.SelectedItem.Text;
            }
            else
            {
                Label1.ForeColor = System.Drawing.ColorTranslator.FromHtml("Red");
                Label1.Text = "You have selected : " + RadioButtonList1.SelectedItem.Text;
            }
             
        }
        else
        {
            Label1.ForeColor = System.Drawing.ColorTranslator.FromHtml("Red");
            Label1.Text = "None of the option selected";
        }
    }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Cheers!!!&lt;/em&gt;&lt;/p&gt;</description><pubDate>Mon, 17 Dec 2012 20:56:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/uncheck-radio-button-on-double-click</guid></item><item><title>Setup and Deployment of Windows Application with SQL Server Database using Visual Studio 2010</title><link>http://rajneeshverma.com:80/setup-and-deployment-of-windows-application-with-sql-server-database-using-visual-studio-2010</link><description>&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;Recently i got a chance to create a small WPF Application and then i have to create a MSI using Visual Studio 2010 using SQL Server 2008 Database. (I have to create a MSI which will create a Database in SQL Server 2008 Express and then create Tables, Store Procedures and also insert some Data in tables.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Create an Application with SQL Server 2008&lt;/strong&gt; (For example i have created a WPF Application which fill a DataGrid with Product Table.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Create two connection string in app.config file as below:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;connectionStrings&amp;gt;
      &amp;lt;!-- Connection sting to connect Master Database--&amp;gt;
        &amp;lt;add name="WPFTest.Properties.Settings.masterConnectionString"
            connectionString="Data Source=.\sqlexpress;Initial Catalog=master;Integrated Security=True"
            providerName="System.Data.SqlClient" /&amp;gt;
      &amp;lt;!-- Connection sting to connect your Program Database--&amp;gt;
      &amp;lt;add name="WPFTest.Properties.Settings.TestConnectionString"
          connectionString="Data Source=.\sqlexpress;Initial Catalog=TestDB;Integrated Security=True"
          providerName="System.Data.SqlClient" /&amp;gt;
    &amp;lt;/connectionStrings&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;First for Master Database and second for your Application Database.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Create a Installer class:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;a) On the &lt;em&gt;Project&lt;/em&gt; menu, click &lt;em&gt;Add New Item&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;b) In the &lt;em&gt;Add New Item&lt;/em&gt; dialog box, select &lt;em&gt;Installer Class.&lt;/em&gt; In the &lt;em&gt;Name&lt;/em&gt; box, type &lt;em&gt;SetupInstaller.cs.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Create a text file that contains a SQL statement to create Tables in Database:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;a) In &lt;em&gt;Solution Explorer&lt;/em&gt;, select the &lt;em&gt;&amp;lt;YourProject&amp;gt; project&lt;/em&gt;. On the &lt;em&gt;Project&lt;/em&gt; menu, click &lt;em&gt;Add New Item&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;b) In the &lt;em&gt;Add New Item&lt;/em&gt; dialog box, click &lt;em&gt;Text File&lt;/em&gt;. In the &lt;em&gt;Name&lt;/em&gt; box, type &lt;em&gt;tables.txt&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;c) Add the &lt;em&gt;Create Tables&lt;/em&gt; Script in &lt;em&gt;tables.txt&lt;/em&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;CREATE TABLE [dbo].[Product](
    [ProductID] [int] IDENTITY(1,1) NOT NULL,
    [Name] [nvarchar](50) NULL,
    [ProductNumber] [nvarchar](25) NOT NULL,
    [Color] [nvarchar](15) NULL,
    [StandardCost] [money] NOT NULL,
    [ListPrice] [money] NOT NULL,
    [Size] [nvarchar](5) NULL,
    [Weight] [decimal](8, 2) NULL,
    [ProductCategoryID] [int] NULL,
    [ProductModelID] [int] NULL,
    [SellStartDate] [datetime] NOT NULL,
    [SellEndDate] [datetime] NULL,
    [DiscontinuedDate] [datetime] NULL,
    [ThumbNailPhoto] [varbinary](max) NULL,
    [ThumbnailPhotoFileName] [nvarchar](50) NULL,
    [rowguid] [uniqueidentifier] ROWGUIDCOL  NOT NULL,
    [ModifiedDate] [datetime] NOT NULL
) ON [PRIMARY];&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;em&gt; Make sure you are adding ; (semicolon) at the end of each statement and also remove GO from all the script. You can add insert statement in this file.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;To Generate SQL Server Database Script see the below link:&lt;/p&gt;
&lt;p&gt;Create Script to Copy Database Schema and All The Objects&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;d) In &lt;em&gt;Solution Explorer&lt;/em&gt;, select &lt;em&gt;tables.txt&lt;/em&gt;. In the &lt;em&gt;Properties&lt;/em&gt; window, set the &lt;em&gt;BuildAction&lt;/em&gt; property to &lt;em&gt;Embedded Resource&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;e) If you have &lt;em&gt;stored procedure&lt;/em&gt; in your &lt;em&gt;Database&lt;/em&gt; then Add a new &lt;em&gt;txt file&lt;/em&gt; (named as &lt;em&gt;getproduct.txt&lt;/em&gt;) as described above and add the create stored procedure statement in the file.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;CREATE PROCEDURE spGetProduct 
     
AS
BEGIN
    SET NOCOUNT ON;
    SELECT * FROM Product;
END&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;f) In &lt;em&gt;Solution Explorer&lt;/em&gt;, select &lt;em&gt;getproduct.txt&lt;/em&gt;. In the &lt;em&gt;Properties&lt;/em&gt; window, set the &lt;em&gt;BuildAction&lt;/em&gt; property to &lt;em&gt;Embedded Resource&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. Add code to the installer class to read the text files&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;a) In &lt;em&gt;Solution Explorer&lt;/em&gt;, select &lt;em&gt;SetupInstaller.cs&lt;/em&gt;. On the &lt;em&gt;View&lt;/em&gt; menu, click &lt;em&gt;Code&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;b) Add the following &lt;em&gt;Namespaces&lt;/em&gt; statement at the top of the module:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;using System.IO;
using System.Data.SqlClient;
using System.Reflection;
using System.Windows;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;c) Add the following code to the &lt;em&gt;SetupInstaller&lt;/em&gt; class, after the declaration of &lt;em&gt;base ()&lt;/em&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[RunInstaller(true)]
    public partial class SetupInstaller : System.Configuration.Install.Installer
    {
        SqlConnection masterConnection = new SqlConnection();
        public SetupInstaller(): base()
        {
            InitializeComponent();
        }
        private string GetSql(string Name)
        {
 
            try
            {
                // Gets the current assembly.
                Assembly Asm = Assembly.GetExecutingAssembly();
 
                // Resources are named using a fully qualified name.
                Stream strm = Asm.GetManifestResourceStream(Asm.GetName().Name + "." + Name);
 
                // Reads the contents of the embedded file.
                StreamReader reader = new StreamReader(strm);
                return reader.ReadToEnd();
 
            }
            catch (Exception ex)
            {
                MessageBox.Show("In GetSQL: " + ex.Message);
                throw ex;
            }
        }
 
        private void ExecuteSql(string DatabaseName, string Sql)
        {
            System.Data.SqlClient.SqlCommand Command = new System.Data.SqlClient.SqlCommand(Sql, masterConnection);
 
            // Initialize the connection, open it, and set it to the "master" database
            masterConnection.ConnectionString = Properties.Settings.Default.masterConnectionString;
            Command.Connection.Open();
            Command.Connection.ChangeDatabase(DatabaseName);
            try
            {
                Command.ExecuteNonQuery();
            }
            finally
            {
                // Closing the connection should be done in a Finally block
                Command.Connection.Close();
            }
        }
 
        protected void AddDBTable(string strDBName)
        {
            try
            {
                // Creates the database.
                ExecuteSql("master", "CREATE DATABASE " + strDBName);
 
                // Creates the tables.
                ExecuteSql(strDBName, GetSql("tables.txt"));
 
                // Creates the stored procedure.
                ExecuteSql(strDBName, GetSql("getproduct.txt"));
 
            }
            catch (Exception ex)
            {
                // Reports any errors and abort.
                MessageBox.Show("In exception handler: " + ex.Message);
                throw ex;
            }
        }
 
 
        public override void Install(System.Collections.IDictionary stateSaver)
        {
            base.Install(stateSaver);
            AddDBTable("TestDB");
        }
 
        [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]
        public override void Uninstall(IDictionary savedState)
        {
            base.Uninstall(savedState);
            ExecuteSql("master", "DROP DATABASE TestDB");
        }
    }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;6. Create a deployment project&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;a) On the &lt;em&gt;File&lt;/em&gt; menu, click &lt;em&gt;Add&lt;/em&gt;, and then click &lt;em&gt;New Project&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;b) In the &lt;em&gt;Add New Project&lt;/em&gt; dialog box, open the &lt;em&gt;Other Project Types&lt;/em&gt; node and select &lt;em&gt;Setup and Deployment Projects&lt;/em&gt; in the &lt;em&gt;Project Type&lt;/em&gt; pane. Then select &lt;em&gt;Setup Project&lt;/em&gt; in the &lt;em&gt;Templates pane&lt;/em&gt;. In the Name box, type &lt;em&gt;WPFTestInstaller&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;c) In the &lt;em&gt;Properties window&lt;/em&gt;, select the &lt;em&gt;ProductName&lt;/em&gt; property and type &lt;em&gt;DB Installer&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;d) In the &lt;em&gt;File System Editor&lt;/em&gt;, select the &lt;em&gt;Application Folder&lt;/em&gt;. On the &lt;em&gt;Action menu&lt;/em&gt;, click &lt;em&gt;Add&lt;/em&gt;, and then click &lt;em&gt;Project Output&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;e) In the &lt;em&gt;Add Project Output&lt;/em&gt; Group dialog box, select &lt;em&gt;Primary output&lt;/em&gt; for the &lt;em&gt;WPFTest&lt;/em&gt; project.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If you want to create desktop Shortcut/Start-&amp;gt;All Programs with Icon then follow below steps:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;f) In the &lt;em&gt;File System Editor&lt;/em&gt;, select the &lt;em&gt;Application Folder&lt;/em&gt;. On the &lt;em&gt;Action menu&lt;/em&gt;, click &lt;em&gt;Add&lt;/em&gt;, and then click &lt;em&gt;File&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;g) &lt;em&gt;Browse&lt;/em&gt; and select a &lt;em&gt;.ico&lt;/em&gt; file to make it as Icon of your &lt;em&gt;Project&lt;/em&gt;. Then click &lt;em&gt;OK&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;h) Right click on &lt;em&gt;Primary output&lt;/em&gt; for &lt;em&gt;WPFTest (Active)&lt;/em&gt; and select &lt;em&gt;Create Shortcut to Primary output for WPFTest (Active)&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;i) Rename &lt;em&gt;Shortcut to Primary output for WPFTest (Active)&lt;/em&gt; to your Application name &lt;em&gt;(WPF Test)&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;j) Right click on &lt;em&gt;WPF Test&lt;/em&gt; then select &lt;em&gt;Properties Window&lt;/em&gt;, In the &lt;em&gt;Icon&lt;/em&gt; section select &lt;em&gt;dropdown&lt;/em&gt; and click on &lt;em&gt;Browse&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;k) In the Icon &lt;em&gt;Window&lt;/em&gt; click &lt;em&gt;Browse&lt;/em&gt; then double click &lt;em&gt;Application Folder&lt;/em&gt; and select your &lt;em&gt;Icon&lt;/em&gt; file and click &lt;em&gt;OK.OK.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;l) &lt;em&gt;Drag&lt;/em&gt; the &lt;em&gt;WPF Test&lt;/em&gt; and &lt;em&gt;drop&lt;/em&gt; it into &lt;em&gt;User's Desktop&lt;/em&gt; in &lt;em&gt;File System Editor.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;m) &lt;em&gt;Repeat&lt;/em&gt; the &lt;em&gt;step h, i, j&lt;/em&gt; and &lt;em&gt;k&lt;/em&gt; and then &lt;em&gt;Drag&lt;/em&gt; the &lt;em&gt;WPF Test&lt;/em&gt; and &lt;em&gt;drop&lt;/em&gt; it into &lt;em&gt;User's Program Menu&lt;/em&gt; in &lt;em&gt;File System Editor&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;7. Create a custom action&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;a) Select the &lt;em&gt;WPFTestInstaller&lt;/em&gt; project in &lt;em&gt;Solution Explorer.&lt;/em&gt; On the &lt;em&gt;View&lt;/em&gt; menu, point to &lt;em&gt;Editor&lt;/em&gt;, and then click &lt;em&gt;Custom Actions.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;b) In the &lt;em&gt;Custom Actions Editor,&lt;/em&gt; select the &lt;em&gt;Install&lt;/em&gt; node. On the &lt;em&gt;Action menu&lt;/em&gt;, click &lt;em&gt;Add Custom Action.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;c) In the &lt;em&gt;Select item in project&lt;/em&gt; dialog box, double-click the &lt;em&gt;Application Folder&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;d) Select &lt;em&gt;Primary output from DBCustomAction (Active),&lt;/em&gt; then click &lt;em&gt;OK&lt;/em&gt; to close the dialog box.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;e) &lt;em&gt;Repeat&lt;/em&gt; the step &lt;em&gt;b, c&lt;/em&gt; and &lt;em&gt;d&lt;/em&gt; for &lt;em&gt;Uninstall&lt;/em&gt; node of &lt;em&gt;Custom Actions Editor.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;f) On the &lt;em&gt;Build&lt;/em&gt; menu, click &lt;em&gt;Build WPFTestInstaller.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;8. Install/Uninstall the application on your development computer.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;a) Select the &lt;em&gt;WPFTestInstaller&lt;/em&gt; project in &lt;em&gt;Solution Explorer.&lt;/em&gt; On the &lt;em&gt;Project&lt;/em&gt; menu, click &lt;em&gt;Install.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;b) Select the &lt;em&gt;WPFTestInstaller&lt;/em&gt; project in &lt;em&gt;Solution Explorer.&lt;/em&gt; On the &lt;em&gt;Project&lt;/em&gt; menu, click &lt;em&gt;Uninstall.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;9. To get the installer msi&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;a) In the &lt;em&gt;Solution Explorer&lt;/em&gt; right click on &lt;em&gt;WPFTestInstaller&lt;/em&gt; and select &lt;em&gt;Open Folder&lt;/em&gt; in &lt;em&gt;Windows Explorer.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;b) In the &lt;em&gt;Debug&lt;/em&gt; Folder you will get your &lt;em&gt;DB Installer.msi.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Take this DB Installer.msi and you can install it to other systems which has .net 4.0 and SQL Server 2008 Express Installed.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Source Code: &lt;a href="http://rajneeshverma.com/Media/Default/005/WPFTest.rar" target="_blank"&gt;WPFTest.rar (510.28 kb)&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;To Create this Application i have taken the help of Microsoft Walkthrough&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://msdn.microsoft.com/en-us/library/49b92ztk(v=vs.100).aspx" target="_blank"&gt;&lt;em&gt;Using a Custom Action to Create a Database at Installation&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Thu, 16 Aug 2012 19:53:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/setup-and-deployment-of-windows-application-with-sql-server-database-using-visual-studio-2010</guid></item><item><title>Sending Mail in Go-daddy Shared Hosting using Google Apps Mail</title><link>http://rajneeshverma.com:80/sending-mail-in-go-daddy-shared-hosting-using-google-apps-mail</link><description>&lt;!-- Go to www.addthis.com/dashboard to customize your tools --&gt;
&lt;div class="addthis_native_toolbox"&gt;&lt;/div&gt;
&lt;p&gt;Most of the time we are facing problem when trying to use feedback form in the website which is hosted in GoDaddy servers in shared hosting and we are using Google Apps as mail for the domain.&lt;/p&gt;
&lt;p&gt;When we are developing the application in local its working fine but when we deployed in production server it does not send any mail. This issue occures because GoDaddy does not allow external host server for sending mail.&lt;/p&gt;
&lt;p&gt;For Google Apps normally we are using Gmails SMTP settings as:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;1) SMTP Server: smtp.gmail.com&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;2)&amp;nbsp;Port: 465/ 587&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;3)&amp;nbsp;Enable SLL = True&lt;/p&gt;
&lt;p&gt;but these credentials are not working in GoDaddy Shared hosting.&lt;/p&gt;
&lt;p&gt;Below is the Code i am using for sending mail in GoDaddy Shared Servers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;HTML Markup:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;div style="margin:0 auto; width:900px; padding-left:50px; padding-top:220px; background-image:url

(images/bg.gif); text-align:center; font-family:Verdana; font-size:10pt; color:#ffffff;"&amp;gt;
      
      &amp;lt;table&amp;gt;
      
        &amp;lt;tr&amp;gt;
            &amp;lt;td colspan="3" align="left"&amp;gt;&amp;lt;h2&amp;gt;Mail Details:&amp;lt;/h2&amp;gt;&amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
      
        &amp;lt;tr&amp;gt;
            &amp;lt;td align="left" width="150px"&amp;gt;&amp;lt;strong&amp;gt;Mail From&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="center" width="20px"&amp;gt;&amp;lt;strong&amp;gt;:&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="left"&amp;gt;
                &amp;lt;asp:TextBox ID="txt_mailfrom" runat="server" Width="200px"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
      
        &amp;lt;tr&amp;gt;
            &amp;lt;td align="left" width="150px"&amp;gt;&amp;lt;strong&amp;gt;Mail To&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="center" width="20px"&amp;gt;&amp;lt;strong&amp;gt;:&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="left"&amp;gt;
                &amp;lt;asp:TextBox ID="txt_mailto" runat="server" Width="200px"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
      
        &amp;lt;tr&amp;gt;
            &amp;lt;td align="left" width="150px" colspan="3"
                style="font-weight: 700; font-size: medium"&amp;gt;
                &amp;lt;h2&amp;gt;
                    Feedback:&amp;lt;/h2&amp;gt;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
      
        &amp;lt;tr&amp;gt;
            &amp;lt;td align="left" width="150px"&amp;gt;&amp;lt;strong&amp;gt;Name&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="center" width="20px"&amp;gt;&amp;lt;strong&amp;gt;:&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="left"&amp;gt;&amp;lt;asp:TextBox ID="txt_name" runat="server" Width="200px" 

Height="22px"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;
            &amp;lt;td align="left" width="150px"&amp;gt;&amp;lt;strong&amp;gt;Father's Name&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="center" width="20px"&amp;gt;&amp;lt;strong&amp;gt;:&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="left"&amp;gt;&amp;lt;asp:TextBox ID="txt_father" runat="server" Width="200px" 

Height="22px"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
          
        &amp;lt;tr&amp;gt;
            &amp;lt;td align="left" width="150px"&amp;gt;&amp;lt;strong&amp;gt;Contact Number&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="center" width="20px"&amp;gt;&amp;lt;strong&amp;gt;:&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="left"&amp;gt;&amp;lt;asp:TextBox ID="txt_contact" runat="server" Width="200px" 

Height="22px"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
          
        &amp;lt;tr&amp;gt;
            &amp;lt;td align="left" width="150px"&amp;gt;&amp;lt;strong&amp;gt;Email ID&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="center" width="20px"&amp;gt;&amp;lt;strong&amp;gt;:&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="left"&amp;gt;&amp;lt;asp:TextBox ID="txt_mail" runat="server" Width="200px" 

Height="22px"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;
                &amp;lt;asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
                    ErrorMessage="xyz@x.x" ControlToValidate="txt_mail"
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w

+)*"&amp;gt;&amp;lt;/asp:RegularExpressionValidator&amp;gt;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;
            &amp;lt;td align="left" width="150px"&amp;gt;&amp;lt;strong&amp;gt;Address&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="center" width="20px"&amp;gt;&amp;lt;strong&amp;gt;:&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="left"&amp;gt;&amp;lt;asp:TextBox ID="txt_address" runat="server" Width="200px"
                    Height="35px" TextMode="MultiLine"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;
            &amp;lt;td align="left" width="150px"&amp;gt;&amp;lt;strong&amp;gt;Message&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="center" width="20px"&amp;gt;&amp;lt;strong&amp;gt;:&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="left"&amp;gt;&amp;lt;asp:TextBox ID="txt_msg" runat="server" Width="200px"
                    Height="35px" TextMode="MultiLine"&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
          
        &amp;lt;tr&amp;gt;
            &amp;lt;td align="left" width="150px"&amp;gt;&amp;lt;strong&amp;gt;Upload&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="center" width="20px"&amp;gt;&amp;lt;strong&amp;gt;:&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="left"&amp;gt;&amp;lt;asp:FileUpload ID="FileUpload1" runat="server" Width="200px" /&amp;gt;&amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
          
        &amp;lt;tr&amp;gt;
            &amp;lt;td align="left" width="150px"&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="center" width="20px"&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;
            &amp;lt;td align="left"&amp;gt;
                &amp;lt;asp:Button ID="btn_send" runat="server" Text="Submit" BackColor="#CC0000"
                    Height="25px" Width="90px" Font-Bold="True" ForeColor="White"
                    onclick="btn_send_Click" /&amp;gt;  
                    &amp;lt;asp:Button ID="btnclear" runat="server" Text="Clear" BackColor="#CC0000"
                    Height="25px" Width="90px" Font-Bold="True" ForeColor="White"
                    onclick="btnclear_Click" /&amp;gt;
            &amp;lt;/td&amp;gt;
        &amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;&amp;lt;td colspan="3" align="center"&amp;gt;
            &amp;lt;asp:Label ID="lbl_msg" runat="server" ForeColor="#CC0000"&amp;gt;&amp;lt;/asp:Label&amp;gt;
            &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;      
    &amp;lt;/table&amp;gt;  
    &amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Code Block should be as:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;protected void Page_Load(object sender, EventArgs e)
    {
        lbl_msg.Text = "";
        if (!IsPostBack)
        {
            cleartext();
        }
  
    }
    protected void btn_send_Click(object sender, EventArgs e)
    {
        string from = txt_mailfrom.Text;
        string to = txt_mailto.Text;
        string body = "&amp;lt;b&amp;gt;Name : &amp;lt;/b&amp;gt;" + txt_name.Text + "&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;Father Name : &amp;lt;/b&amp;gt;" + 

txt_father.Text + "&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Contact No. : &amp;lt;/b&amp;gt;" + txt_contact.Text + "&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;Email : 

&amp;lt;/b&amp;gt;" + txt_mail.Text + "&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;Address : &amp;lt;/b&amp;gt;" + txt_address.Text + "&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;Message : 

&amp;lt;/b&amp;gt;" + txt_msg.Text;
  
        string message = sendMail(from, to, body, "Feedback", FileUpload1);
        if (message == "")
        {
            lbl_msg.Text = "Message Send Successfully...";
        }
        else
        {
            lbl_msg.Text = message;
        }
          
        cleartext();
    }
    protected void btnclear_Click(object sender, EventArgs e)
    {
        cleartext();
    }
  
    private void cleartext()
    {
        txt_address.Text = string.Empty;
        txt_contact.Text = string.Empty;
        txt_father.Text = string.Empty;
        txt_mail.Text = string.Empty;
        txt_name.Text = string.Empty;
        txt_msg.Text = string.Empty;
        txt_mailfrom.Text = string.Empty;
        txt_mailto.Text = string.Empty;
    }
  
    public string sendMail(string from, string sendTo, string body, string subject, FileUpload file)
    {
        string message = "";
        try
        {
            const string SERVER = "relay-hosting.secureserver.net";
            using (System.Net.Mail.MailMessage mess = new System.Net.Mail.MailMessage())
            {
                System.Net.Mail.SmtpClient sc = new System.Net.Mail.SmtpClient();
                  
                mess.To.Add(sendTo);
                if (file.HasFile)
                    mess.Attachments.Add(new Attachment(file.PostedFile.InputStream, file.FileName));
                mess.Subject = subject;
                mess.Body = body;
                mess.IsBodyHtml = true;
                mess.From = new System.Net.Mail.MailAddress(from);
                sc.Host = SERVER;               
                sc.Send(mess);
           }
        }
        catch (Exception ex)
        {
            message = ex.ToString();
        }
        return message;
    }&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span&gt;Don't forget to add&amp;nbsp;&lt;/span&gt;&lt;em&gt;System.Net.Mail&lt;/em&gt;&lt;span&gt;Namespace&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;em&gt;Please make sure upload the sample files in production server then only it will work. For development server it will throw error.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Sample Attached:&amp;nbsp;&lt;a title="Download Sample" href="http://rajneeshverma.com/Media/Default/004/Sending

%20Mail.rar"&gt;Sending Mail.rar (2.38 kb)&lt;/a&gt;&lt;/p&gt;</description><pubDate>Mon, 09 Jul 2012 19:46:00 GMT</pubDate><guid isPermaLink="true">http://rajneeshverma.com:80/sending-mail-in-go-daddy-shared-hosting-using-google-apps-mail</guid></item></channel></rss>