ASP.NET IIS 7.5 HTTP 500.21 error

This error occurs when ASP.NET is not installed correctly on the computer that you are trying to debug. This might mean that ASP.NET was never installed or that ASP.NET was installed first and IIS was installed later.

In order to register .NET with IIS. Just type from a command prompt window, run the following command:

\WINDOWS\Microsoft.NET\Framework\version\aspnet_regiis -i

where version represents the version number of the .NET Framework installed on your computer, such as v1.0.370. You can determine the framework version by looking in the \WINDOWS\Microsoft.NET\Framework directory.

Example (full command)

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

Batch Files

In DOS, OS/2, and also Microsoft Windows, batch file is the name given to a type of script file, a text file containing a series of commands to be executed by the command interpreter.
For making BATCH (.bat) files, we have to type commands on a single notepad. Say comm.bat here

Example (comm.bat)

dir
pause 
date
pause
time
pause

Output

E:\testDirectory>comm.bat

E:\testDirectory>dir
 Volume in drive E is Softwares
 Volume Serial Number is A804-13D4

 Directory of E:\testDirectory

02-Jun-14  01:10 PM    <DIR>          .
02-Jun-14  01:10 PM    <DIR>          ..
02-Jun-14  01:15 PM                37 comm.bat
               1 File(s)             37 bytes
               2 Dir(s)  30,733,975,552 bytes free

E:\testDirectory>pause
Press any key to continue . . .

E:\testDirectory>date
The current date is: 02-Jun-14
Enter the new date: (dd-mm-yy)

E:\testDirectory>pause
Press any key to continue . . .

E:\testDirectory>time
The current time is: 13:18:04.45
Enter the new time:

E:\testDirectory>pause
Press any key to continue . . .

E:\testDirectory>

Hide an drive using Cmd prompt

Many people have been concerned about privacy and security. But they depend on third party apps to lock their files or hide their folders. Why to depend on Third party apps.? Here is a simple tutorial to Hide an Hard Disk Drive using command Prompt.

How to Hide a Local Drive using command prompt?

Step 1:
Open Command Prompt
Step 2:
Type DISKPART and hit Enter
Step 3:
Type list volume and hit Enter
Step 4:
Command Prompt displays all the partitions of the Hard Drive :

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0         System Rese  NTFS   Partition    100 MB  Healthy    System
  Volume 1     C                NTFS   Partition     48 GB  Healthy    Boot
  Volume 2     D   Softwares    NTFS   Partition     97 GB  Healthy
  Volume 3     F   Books & Ref  NTFS   Partition     86 GB  Healthy

Then type the Drive Letter that you want to hide. If you want to hide volume D, type :

select volume D 

Then type the Drive Letter that you want to hide. If you want to hide volume D, type :

remove letter D

Now restart your computer. When you start your PC again, you wont be able to see the particular drive in My Computer.

How to get back Hidden Drive again

Step 1:
Open Command Prompt
Step 2:
Type DISKPART and hit Enter
Step 3:
Type list volume and hit Enter
Step 4:

If you want to unhide volume D, type select volume D and hit Enter.

Now your drive will be shown

Pen drive size is displayed but not contents

ATTRIB Command

attrib is a command, in DOS, OS/2 and Microsoft Windows. The function of attrib is to set and remove file attributes (read-only, archive, system and hidden).
There are four attributes in Windows files:

  • (r) Read-only file attribute
  • (a) Archive file attribute
  • (s) System file attribute
  • (h) Hidden file attribute

One or more of these attributes can be set [+x] or cleared [-x] in a single instance of the command for a specific file, file type, folder or and entire branch of the directory structure (a directory, including all sub-directories). There are three optional switches that can be applied at the end of the DOS command string, although not all switches are recognized for all versions of Windows. These switches are:

  • /S also apply changes to subdirectories of current directory
  • /D also apply changes to folder names (this only applies for Windows 2000 and Windows XP)
  • /L apply to symbolic link itself instead of the target of the symbolic link (introduced with Windows Vista and Windows Server 2008)

The general attrib command syntax is:

attrib [+r|-r] [+a|-a] [+h|-h] [+s|-s] [d:][path]filename [/s] [/d] [/l]

For example, to remove the read-only and hidden file attributes for all files in a directory tree:

attrib -r -h *.* /s /d

Note, the -s parameter will also remove the system attribute for files and should always be used with care and should not be used for genuine system files.

Showing pen drive hidden contents

Showing pen drive hidden contents when pen drive showing size of full contents, but not showing actual contents. (hidden things)

attrib -h -r -s /s /d g:\*.*

Here g:(g drive is your pen drive in computer, replace this letter with a appropriate drive for which contents are not shown)

Tree view of a directory/folder in Windows

In the Windows command prompt you can use “tree /F” to view a tree of the current folder and all descending files & folders. Used as :

C:\>tree /F MainDirectory
Folder PATH listing
Volume serial number is 00000079 F859:0937
C:\MAINDIRECTORY
├───subDirectory1
│   │   file11.txt
│   │   file12.txt
│   │
│   └───subToSubDirectory1
│           file1.txt
│           file2.txt
│           file3.txt
│           file4.txt
│           file5.txt
│           file6.txt
│
└───subDirectory2
        file22.txt
        file23.txt
        file24.txt