Wednesday, 23 April 2014

Install Telnet Client on Windows

You must be logged in as a user with Administrator role to add Telnet client capabilities.

  • Install Telnet Client by using a command line
    • Supported OS: Windows 8/7/Vista, Windows Server 2008
    • Steps:
      • Open a command prompt window. Click Start, type cmd in the Start Search box, and then press ENTER.
      • Type the following command: pkgmgr /iu:"TelnetClient"
    • Note: If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
    • When the command prompt appears again, the installation is complete.
    • Yes, its as simple as that from the command line. :)
  • Install Telnet Client on Windows Server (2008 or >) using Management Console
    • Use the Role Management tool.
    • Steps:
      • Start Server Manager. Click Start, right-click Computer, and then click Manage.
      • If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
      • In the Features Summary section, click Add features.
      • In the Add Features Wizard, select Telnet Client, and then click Next.
      • On the Confirm Installation Options page, click Install.
      • When installation finishes, on the Installation Results page, click Close.
  • Install Telnet Client on Windows 8/7/Vista from Control Panel
    • Use the Windows Features tool.
    • Steps:
      • Click Start, and then click Control Panel.
      • On the Control Panel Home page, click Programs.
      • In the Programs and Features section, click Turn Windows features on or off.
      • If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
      • In the Windows Features list, select Telnet Client, and then click OK.

Thursday, 3 April 2014

Check installed .NET version - Command line

Here is a quick and easy way to find the .NET versions installed on your machine.
This can be used on any machine either development or server machines.
In this method, the .NET framework installation directories are listed corresponding to the installed framework versions.
Use the command to list the framework versions.
dir %WINDIR%\Microsoft.Net\Framework\v*
For a more polished output use the below command.
dir %WINDIR%\Microsoft.Net\Framework\v* /O:-N /B

HTTPHandler Error - 404 Not Found

If your Web.Config is like below:
<httpHandlers>
<add verb="*" path="myhandler.api" type="MyAssembly.MyHandlerClass, MyAssembly"/>
</httpHandlers>
or
<handlers>
<add name="MyHandler" verb="*" path="myhandler.api" type="MyAssembly.MyHandlerClass, MyAssembly"/>
</handlers>
When you navigate to http://myserver/myApp/myhandler.api, if it gives server error 404 Not Found error, it might be the web config settings that might be the issue.
Solution:
If you are using IIS7, check in which mode your application pool is configured (Check the properties of  Application Pool in IIS Manager for Managed Pipeline mode).
1) If your application pool running in Classic mode, then the handler reference need to go into the following section:
<system.web>
<httpHandlers>
</httpHandlers>
</system.web>
example:
<system.web>
<httpHandlers>
<add verb="*" path="myhandler.api" type="MyAssembly.MyHandlerClass, MyAssembly"/>
</httpHandlers>
</system.web>
2) If your application pool running in Integrated pipelined mode, then the handler reference need to go into the following section:
<system.webServer>
<handlers>
</handlers>
<system.webServer>
example:
<system.webServer>
<handlers>
<add name="MyHandler" verb="*" path="myhandler.api" type="MyAssembly.MyHandlerClass, MyAssembly"/>
</handlers>
<system.webServer>