IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact

How to Install IIS on Windows 10

Although IIS is included in every installation of Windows 10, it’s not turned on by default. Here’s a way to install IIS on Windows 10.

  1. Right-click on the Windows button on the bottom-left corner and select Run

    Windows Run

  2. In the Run dialog box, type appwiz.cpl and press ENTER.

    Windows run appwiz.cpl

  3. As soon as a new window called Programs and Features is opened, click on the link Turn Windows features on or off.

    Windows Programs and Features

  4. Click on the Internet Information Services checkbox. By default it will install all you need to host a website. However you might want to check some other components that you might need as well. Once done, click OK and Close when it says “Windows completed the requested changes.”

    IIS Windows Features

  5. Now open your browser and type in localhost and press ENTER. You should see a default web page is rendered in your browser.

    IIS Default Page

That’s all there is to it and the default website directory will be in C:\Inetpub\wwwroot folder.

Further Reading

How to Manage IIS Remotely
How to Manage IIS Servers Remotely with WMSVC
How to Backup IIS Manager Connections List on Windows
How to Install IIS Management Console on Windows
How to Migrate IIS Websites to a Different Server
New Features Introduced in IIS 10.0
How to Setup HTTP Strict Transport Security (HSTS) on IIS
How to Activate Built-in Web Server

May 31, 2018 Filed Under: How To Tagged With: IIS, Internet Information Services, Microsoft, Windows

How to Setup Visual Studio Code for Hugo Static Site Generator

Based on a few questions on how to setup an environment to edit content using Hugo, here’s a few simple steps to follow if you want a quick and easy way to do it. Keep in mind, the beauty of using Hugo is that you are free to use any text editor you like.

This is not the only way to do it but this will get you there fast if you don’t have anything setup yet.

Assumptions

  1. Hugo is already installed, if not please check out the steps on how to install Hugo. For Windows OS, here’s a simple way to install Hugo.

  2. Git for Windows is also installed and setup. This is an optional step but it’s highly recommended if you want to track your edit history.

Steps

  1. Download and install Visual Studio Code. Once done, launch the editor.

  2. Download the following Visual Studio Code extensions to help you [Markdown Shortcuts, Better TOML, Git History]. While this step is optional, it will help to speed up your workflow in creating/editing your static site.

    Visual Studio Code Extensions for Hugo

  3. Once you created your Hugo workspace, open the folder from Visual Studio Code.

That’s about it and you’re ready to create your Hugo static site.

When you’re ready to publish the site, check out the post below if you’re thinking about hosting it on an IIS server.

Further Reading

How to Install Hugo on Windows 10
How to Deploy Hugo Static Website to IIS Using Git
How to Setup Naked Domain to Resolve in Cloudflare Pages
How to Open Visual Studio Code from command line macOS

Downloads

Visual Studio Code
Git
Hugo

May 30, 2018 Filed Under: How To Tagged With: Code Editor, Hugo, JAMStack, Microsoft, Visual Studio Code

How to Setup Visual Studio 2017 or 2019 for F#

If you want to try F# programming in Visual Studio 2017 (or 2019 for that matter), here’s what you might want to do to optimize Visual Studio to run optimally on your machine.

  1. From the menu, go to Tools and select Options.
  2. Under Debugging, set the Enable script debugging to True.
  3. Under Misc, set 64-bit F# Interactive to True (if you use 64-bit Windows OS).
  4. Set F# Interactive options to the following:
        --optimize- --readline+ --debug+ -d:TRACE
        
  5. Set Shadow copy assemblies to True and click OK.

    Visual Studio 2017 F# Tools initial settings

This “once and forget it” setup serves the following purposes:

  1. Enable you to debug F# in Visual Studio and run it as a 64-bit process (better).
  2. Set Visual Studio to output trace messages within F# scripts. You can also check the F# Interactive Options and the compiler options for more details.
  3. Set the referenced assemblies not to be locked by the F# Interactive process.
  4. Next, scroll up to Text Editor and expand on the F#.
  5. Under General, check the Line numbers and click OK.

    Visual Studio 2017 F# Options for Line numbers

One more tip with F# project, when creating a new F# project you can choose between .NET Core or .NET Standard. But you can also use the .NET Framework for F# Console Application. Just make sure you select Visual F# on the left-pane of the new project window, then you can select the .NET Framework you want to use for your project.

Start a new F# Console Application project with .NET Framework 4.6

Further Reading

Get Programming with F: A guide for .NET developers
F# Interactive Options
F# Compiler Options
Seq, List, Array, Map, Set. Which One to Use?

March 28, 2018 Filed Under: .NET, How To Tagged With: FSharp, Microsoft

How to Upgrade to PHP 7.2 on IIS (Windows 10)

This tutorial is a shorter version of the previous post upgrading to PHP 7.1 on Windows 10 and it is intended as a follow-up on how to upgrade your PHP to the latest version (in this case PHP 7.2) if you have already installed the previous version of PHP 7 in your Windows system.

Steps to Upgrade from PHP 7.1 to PHP 7.2

  1. Download PHP for Windows. Since we’re using PHP as FastCGI, we’ll use the 64-bit Non-Thread Safe (NTS) version (i.e., php-7.2.1-nts-Win32-VC15-x64.zip).

  2. PHP 7.2 is also the first version that requires Visual C++ Redistributable for Visual Studio 2017. If you don’t have it installed, you can download it from here (64-bit). If you have a 32-bit OS, please check on the download section below and select the one for x86.

  3. We also need to upgrade our WinCache version for PHP 7.2. Download the WinCache php_wincache-2.0.0.8-7.2-nts-vc15-x64 and extract the file as well.

    WinCache Binary for PHP 7.2

  4. Extract both downloaded zip files (just double-click them and they will be extracted into their sub-folders) as shown below:

    PHP 7.2 and WinCache zip files extracted to sub-folders

  5. If you check the WinCache folder php_wincache-2.0.0.8-7.2-nts-vc15-x64, look for two files with the following names: php_wincache.dll and php_wincache.pdb.

  6. Copy the two files from the WinCache folder to a sub-folder (“ext”) within the PHP folder (i.e., php-7.2.1-nts-Win32-VC15-x64/ext).

    Copy php_wincache files from WinCache folder to ext sub-folder under PHP folder

  7. Now, copy the whole content of php_wincache-2.0.0.8-7.2-nts-vc15-x64 folder into a new folder and name it v7.2.

    Copy all PHP files to a new folder v7.2

  8. Copy the php.ini file from v7.1 to v7.2.

  9. You might want to modify certain parameters in the php.ini as highlighted below:

    [WebPIChanges]
    error_log=C:\WINDOWS\temp\PHP72x64_errors.log
    upload_tmp_dir=C:\WINDOWS\temp
    session.save_path=C:\WINDOWS\temp
    cgi.force_redirect=0
    cgi.fix_pathinfo=1
    fastcgi.impersonate=1
    fastcgi.logging=0
    max_execution_time=300
    date.timezone=Australia/Melbourne
    extension_dir="C:\Program Files\PHP\v7.2\ext\"
    

    And make sure you also have the PHP_WINCACHE set.

    [PHP_WINCACHE]
    extension=php_wincache.dll
    

    The change is pretty simple and we can compare the two php.ini files between v7.1 and v7.2 as below:

    Compare php.ini files between v7.1 and v7.2

  10. Open IIS Manager and click on FastCGI Settings.

    IIS Manager FastCGI Settings

  11. You can create a new entry for PHP 7.2 by following Step 8 from previous post, except for PHPRC where you want to update the value to 7.2 (i.e., C:\Program Files\PHP\v7.2).

    Once completed, just click OK.

    IIS Manager FastCGI Settings Modify PHPRC to version 7.2

  12. Go back to IIS Manager and click on Handler Mappings.

    IIS Manager Handler Mappings

  13. Look for PHP_via_FastCGI and double-click on it. Make sure the path for the Executable is updated accordingly. Click OK when done.

    IIS Manager Handler Mappings PHP_via_FastCGI set to v7.2

Update Windows Environment Variables

Finally, once again we need to update the path of the new PHP in Windows Environment Variables.

  1. Click on the Windows start button and type in “system” and click on System Control panel.

    Windows System Control Panel

  2. In System window, click on Advanced system settings and on System Properties window, make sure you have Advanced tab opened. And you can follow the path shown in the picture to update the path to where your PHP 7.2 is located.

    Control Panel System Environment Variables Update to PHP 7.2

  3. Click on Environment Variables… button.

  4. Under System Variables, click on Path and Edit… button.

  5. Click on where the current PHP is located and double-click it or click on Edit button.

  6. Change the value to the location of the new PHP (i.e., C:\Program Files\PHP\v7.2)

  7. Click OK button on each window to close.

That’s it! Now using the same test.php file with the following code:

<?php phpinfo(); ?>

Run it from your browser (i.e., http://localhost/test.php). If PHP is installed with the correct version, you will see the PHP version will be updated similar to the picture below:

phpinfo 7.2.1 displayed on a page

Further Reading

How to Install PHP on Windows 10 Using Web Platform Installer
FastCGI
Difference between PHP thread safe and non thread safe binaries
Using FastCGI to Host PHP Applications on IIS 7
WinCache Extension for PHP

Download

Download PHP For Windows: Binaries and sources Releases
WinCache 2.0.0.8 PHP Extension Direct Download
Microsoft Visual C++ Redistributable for Visual Studio 2017

January 19, 2018 Filed Under: How To Tagged With: IIS, Internet Information Services, Microsoft, PHP, Windows, Windows 10

How to Reassign Shortcut Key for Column Selection in Visual Studio Code

If you use column selection often in Visual Studio Code, you may find the default shortcut keys combination is a bit too much. By default, to make a column selection or multiple lines in the same horizontal cursor position, you need to press CTRL-SHIFT-ALT and either UP or DOWN arrow depending on the direction of your selections.

Fortunately, you can always assign your own shortcut keys for virtually any functions in this powerful code editor.

So here are the steps to do so.

  1. From the top menu, select File -> Preferences -> Keyboard Shortcuts (or press a combination of CTRL-K CTRL-S) to open the Keyboard Shortcuts windows.

    Visual Studio Code Preferences

  2. Within Keyboard Shorcuts window, look for the following:

     
    cursorColumnSelectDown
    cursorColumnSelectUp
    cursorColumnSelectPageDown
    cursorColumnSelectPageUp
    
  3. Right-click and select Change Keybinding (CTRL-K CTRL-K) and press the key combination you want to use and press ENTER to save it or ESCAPE to cancel. In this example, I use a keyboard combination SHIFT-ALT-ARROW. Repeat this step for each operation.

  4. Once completed, you should see something similar to the screenshot below in your Keyboard Shortcuts window.

    Visual Studio Code Keyboard Shortcuts

That’s it.

If you want to see the configuration in JSON format, you can click on the active link keybindings.json on the top of the Keyboard Shortcuts window (For advanced customizations open and edit keybindings.json), then you’ll see the JavaScript Object Notation that looks similar to the following:

// Place your key bindings in this file to overwrite the defaults
[
    {
        "key": "shift+alt+down",
        "command": "cursorColumnSelectDown",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+shift+alt+down",
        "command": "-cursorColumnSelectDown",
        "when": "editorTextFocus"
    },
    {
        "key": "shift+alt+up",
        "command": "cursorColumnSelectUp",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+shift+alt+up",
        "command": "-cursorColumnSelectUp",
        "when": "editorTextFocus"
    },
    {
        "key": "shift+alt+pagedown",
        "command": "cursorColumnSelectPageDown",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+shift+alt+pagedown",
        "command": "-cursorColumnSelectPageDown",
        "when": "editorTextFocus"
    },
    {
        "key": "shift+alt+pageup",
        "command": "cursorColumnSelectPageUp",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+shift+alt+pageup",
        "command": "-cursorColumnSelectPageUp",
        "when": "editorTextFocus"
    }
]

As indicated on the top banner of Keyboard Shortcuts window, as an advanced user, can always go straight to the keybindings.json and modify the keyboard shortcuts in the json file directly.

Related Articles

How to Make Visual Studio Code Colorize Classic ASP Code
How to Reassign Column Selection Shortcut Keys in Sublime Text
How to Open Visual Studio Code from command line macOS
How to Add Comma to Each Line Using Visual Studio Code or Sublime Text

Further Reading

Key Bindings for Visual Studio Code

Download

Visual Studio Code

August 10, 2017 Filed Under: How To Tagged With: Code Editor, Microsoft, Visual Studio Code

« Previous Page
Next Page »
Buy me a coffee Support this site
Buy Me a Coffee?

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • Tips and Tricks
  • Uncategorized
  • Use Case
  • WordPress
  • Writing

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Tags

.NET .NET Core AdSense ASP.NET Cdonts Dll Classic ASP Code Editor ETL FSharp Genesis Framework Git Google HP Asset Manager HTML5 Hugo IIS Information Security Internet Internet Information Services iOS JAMStack Linux macOS Microsoft Microsoft SQL Server MVC PHP PowerShell Python Simple Mail Transfer Protocol Smtp Server SQL SQL Server SSIS SSMS SSRS Sublime Text Visual Studio Visual Studio Code VPN Windows Windows 8 Windows 10 Windows 2012 Windows Server

Copyright © 2011-2025 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure