Redirect HTTP to HTTPS IIS

Redirect http to https in IIS. a. Run the control panel, administrative tool, server manager. Click the “Configure IE ESC” link and turn ESC off for Administrators. b. Run Internet …

LOC Visual Studio

Visual Studio 2010 and higher has this built in: Analyze > Calculate Code Metrics Visual Studio Plugin: http://www.wndtabs.com/ Powershell (counts non blanks): 123PS C:\> (dir -include *.cs,*.xaml -recurse | select-string …

SMTP email through Microsoft 365 via C#

An example of how to use the System.Net namespace to send emails (useful for ssl or tls mail servers). 1234567891011121314151617181920SmtpClient server = new SmtpClient("Smtp.mail.microsoftonline.com"); server.Port = 587; server.EnableSsl = true; …

Epson ESC commands

Useful commands for controlling Epson POS printers. Use ASCII values. a. Cause a cutter activation TM-T88V 27 + 105 ESC + i b. Cause a drawer kick command TM-U375 27 …

C# convert string to enum

12345678910   enum Colour    {       Red,       Green,       Blue    }    // …    Colour c = (Colour) Enum.Parse(typeof(Colour), "Red", true); …