Posts

Showing posts from June, 2018

How can we find .net version in server or computer

Save following code as   xxxx.bat and double click to execute. @echo off SETLOCAL ENABLEDELAYEDEXPANSION if   "%1"=="/?" GOTO :DO_HELP if /I "%1"=="-h" GOTO :DO_HELP if /I "%1"=="-v" GOTO :DO_REG_INFO GOTO :DO_RELEASE_VER :DO_HELP echo Usage: %0 [ -v ^| -h ^| ^/? ] echo            Default: Returns the installed DotNet 4 version. echo -v         Verbose: Returns the all the DotNet 4 registry settings. echo -h or /?   This help screen. echo see: https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed echo. echo Release Number Ver.   Installations echo -------------- -----  ------------------------------------------------- echo 461310 0x709fe 4.7.1  All other Windows OS versions echo 461308 0x709fc 4.7.1  On Windows 10 Fall Creators Update echo 460805 0x70805 4.7    All other Windows OS versions ...

How to do google captcha in form submit in mvc controller

 string EncodedResponse = Request.Form["g-Recaptcha-Response"]; ReCaptchaClass.Validate(EncodedResponse, Request)  public class ReCaptchaClass     {         public static string Validate(string EncodedResponse, HttpRequestBase request)         {             var client = new WebClient();                         if (request.Url.Host == "www-mot-gov-sg.cwp.sg" || request.Url.Host == "www.mot.gov.sg")             {                 client.Proxy.Credentials = new NetworkCredential("www.mot.gov.sg", "NdjdrkhtvTze");             }             else if (request.Url.Host == "www-mot-gov-sg.cwp-stg.sg")             {                 clien...