Saturday, September 3, 2016

IIS Log File Locations, Logs Format, Logging Time Zone And How To Change Time Zone


Default IIS logs time zone is Coordinated Universal Time (UTC) or Greenwich Mean Time (GMT). It is because the default file format for IIS logs are W3C. Every site have its own log folder for IIS logs. Default locations are:

  • IIS Logs: C:\inetpub\logs\LogFiles
  • HTTP API error logging C:\Windows\System32\LogFiles\HTTPERR


File Format:
Various IIS log file formats are:
  • World Wide Web Consortium (W3C) Format : UTC time zone
  • Internet Information Services (IIS) Format : Local time zone
  • NCSA Format : Local time zone
W3C, IIS, and NCSA file formats are ASCII text format unless your web sites uses UTF-8 encoding.


Change Logging:
To change the time zone, select the site in the IIS Manager and double clink on the Logging feature icon in the middle window pane. It will load the windows similar to the below image. Select the desired log file format to change the logging time zone.
For example: Select IIS instead of W3C if you want to see the logs in local time zone. I will also show you the log file directory.

Additionally, you will also have an option to select logs rollover.



Thanks.


Sunday, August 28, 2016

Installing IIS Web Server on Windows 7

What is IIS?
Internet Information Service (IIS) is a web server developed by Microsoft which supports HTTP, HTTPS, FTP, SMTP and other internet protocols.


Installing IIS:
Open Add or Remove Programs under Programs and Features and then on left hand side, click on Turn Windows features on or off link.

Features pop-up will open. Click on Internet Information Services which will fill the checkbox with a color rather than showing a tick mark. This means the default setting are selected and will be enabled. Expand and select other features if you want to enable them.

Click OK.



Verification:
When IIS is installed on your system, a new service named World Wide Web Publishing Service is added on system services. Alternatively, you can also press windows key and search for the word "IIS" and it should show up in the list if it's installed successfully.




Hope this is helpful.



Sunday, April 17, 2016

How To Add IP Addresses To Your Windows Server


You can follow the steps below to add IP Address to Windows machine.


To Add IP Addresses to Windows 2003 Server:

  • Log in to the server.
  • Go to Control Panel --> Network Connections --> Local Area Connection
  • Right-click on Properties
  • Select Internet Protocol (TCP/IP)
  • Click Properties
  • Click Advanced
  • Click Add
  • Add the new IP address, also provide 255.255.255.0 as the subnet mask or provide these details as per your requirement.


To Add IP Addresses to Your Dedicated Windows 2008 Server

  • Log into your server via Remote desktop connection.
  • Open the server's Start menu and select Network.
  • Double-click on the Network and Sharing Center icon.
  • Click on the Change Adapter Settings link on the left.
  • Right click on the icon representing your server's network card and select Properties from the menu that appears.
  • Select Internet Protocol Version 4 (TCP/IPv4) and click the Properties button.
  • Click the Advanced button.
  • Click the Add button under the IP addresses section of the IP Settings tab.
  • Enter the IP address and subnet mask 255.255.255.0 or provide these details as per your requirement and click the Add button.
  • Click the OK button to close the Advanced TCP/IP Settings window.
  • Click the OK button to close the Internet Protocol Version 4 (TCP/IPv4) Properties window.
  • Click the Close button to close out of the Local Area Connection Properties window.



I hope its helpful.

Wednesday, June 3, 2015

How To Find Out Which Port Is Used By Which Process Or Service? (WINDOWS)

SOLUTION - 1

Windows SysInternals TCPView can show you UDP/TCP ports that are in use and which process is using them.

You can download this utility from Microsoft website http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx

After TCPView download, Unzip it, and run the executable Tcpview.exe to install the software. After install, it should show a pretty GUI listing all TCP/UDP connections with the processes involved.




SOLUTION - 2

Run the command below from windows command prompt:

      netstat -aon | findstr "\<port_number\>"

      -a: To display all connections and listening ports
      -o: To display process id associated with connections
      -n: To display the ports and address in numerical form
       | : To pipe the output of the previous command into next command
      port_number: Replace this text with your port number and do not remove the < or > sign.


this command shall give you the process number associated with the port.



Type the process number in the command below on windows command prompt which will return the associated process or service.

      tasklist | findstr "PID"




So, in this example, port 49154 is associated with process svchost.exe


SOLUTION - 3

Linux' string search utility, grep, is very useful when working on command prompt and we can utilize the functionalities of this utility on windows as well.
To download the utility on windows, either use http://gnuwin32.sourceforge.net/packages/grep.htm or search google for "Grep for windows" and download from some trusted source and install it. (Be careful when you download and you should have anti-virus on your system to avoid browsing malicious websites/software.)

After install, run the command below from windows command prompt (For windows 2008 and above - Open cmd as administratorto list down all TCP/UDP connections with Ports and process details and grep it to match the port:


      netstat -abn | grep -A 1 -B 1 <port number>

      -a: To display all connections and listening ports
      -b: To display executable involved in creating connections and ports
      -n: To display the ports and address in numerical form
      -A 1: To print number of line leading context
      -B 1: To print number of line trailing context
      <port_number>: Replace this entire text including < and > with your port number



As you can see, port 49154 is used by process svchost.exe


I hope this helps.

Tuesday, July 29, 2014

Amazon EC2 - Server Refused Our key - Putty Login Error


I have started an Ubuntu 8 GB, 64-bit Amazon EC2 (Elastic Cloud Compute) instance. When I was trying to access the instance via Putty, I have received error Server refused our key. Screen below for your reference:








Solution that worked for me is by changing the User Name in Putty from ec2-user to ubuntu.

To fix this error I tried so may things. I was at the stage that I removed everything from my AWS account and re-created key-value pair, Instance, and Security group but that still didn't work.

Sometimes, taking a small break from work does wonderful things.



Saturday, July 26, 2014

What is Windows.old folder and how to Reclaim disk space occupied by it


What is Windows.old folder?

This folder is created if you install windows 7 by performing a custom installation or upgrade your Windows 7 Operating system without formatting the partition.





Why the folder gets created?

Files that were used in the previous version of Windows are backed up here during installation.

It provide a roll back point to restore your previous OS if you don't like Windows 7. Also, you can restore data from this backup directory.

For example: If you lost your Mozilla firefox bookmarks during OS upgrade, you can restore them from Windows.old directory. Refer post - Recover Firefox Bookmarks.



Is it safe to delete that folder?

Windows.old directory does occupy good amount of hard disk space. If you find that nothing is missing after upgrade, you can delete this folder else you can keep it for a while just in case you need some file from previous Windows installation. And, remove it later once you are sure nothing is missing.

I removed mine after couple of weeks since I was running out of C: drive space.



Safely reclaim disk space?

You can use disk cleanup utility to safely remove this folder.

Right click on the C:> drive, go to Properties and click on "Disk Cleanup".

Then, click on "Clean up system files" which will calculate all system files you can clean from your system.




Now, select the "Previous Windows installation(s)" check box and click OK.




Confirm by clicking "Delete files" on next window and you are done.




Thank you. I hope its helpful.


Sunday, July 6, 2014

Backup and Recover Mozilla Firefox Bookmarks (On Windows)


Step 1: Firefox creates backup of your browser bookmarks everyday in JSON file format. Go to folder %APPDATA%\Mozilla\Firefox\Profiles\xxxxxxxx.default\bookmarkbackups.

  • xxxxxxxx.default : A folder where 'xxxxxxxx' is some random number.
  • %APPDATA% : An environment variable. To see what value it holds, just type 'echo %APPDATA%' on command prompt.

You will see many .json files there.







Step 2: Open firefox and Press (Ctrl + Shift + B) to open 'Show All Bookmarks' window.







Step 3: then, click menu Import and Backup --> Restore --> Choose File... and, redirect and select the latest ".json" file from location shown in Step 1.

 

 

Step 4: Click OK on the popup below.





Step 5: Verify your bookmarks.





How to change your bookmark backup settings:

By default, Firefox backup your bookmarks for last 15 days. To edit this setting, type about:config in firefox URL and search for the attribute browser.bookmarks.max_backups. Double click on the value and enter the desired value.



Please leave a comment if you find this post helpful. Thanks