Google 2 Step Authenticator – MVC 5.0 ASP.Net C#

Requirement : Implement google 2 step authentication in any existing MVC C# Project. Features : Highly Secure No need of internet to get OTP Code No cost for OTP code unlike SMS No need to wait long to get a code Both IOS and Android are supported Complete solution with source code available for download 30 Days cookie so no need to authenticate daily [Can be changed] Easily add or edit private secure code in web config. Enable 2 step feature from Web.config The session cookie is Encrypted for security purpose Source Code : Download complete source code from my repository: https://github.com/haneefputtur/GauthenticatorMVC5 Steps : Create a blank MVC Project Install Google Authenticator from Nuget Package 3. Add New Controller and name as LoginController Copy Below Code to controller using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web; using System.Web.Configuration; using System.Web.Mvc; using System.Web.Security; using GAuthenticator.Models; using Google.Authenticator; namespace GAuthenticator.Controllers { public class LoginController : Controller { // GET: Login public ActionResult Index() { return View(); } public ActionResult Login() { return View(); } [HttpPost] public ActionResult Login(LoginModel login) { string message = “”; bool status = false; //check UserName and password form our database here string GAuthPrivKey = WebConfigurationManager.AppSettings[“GAuthPrivateKey”]; […]

» Read more

ESP-12E Based Weather Station – NodeMCU 12-E, BME280 and Yaler

Preface : Develop a Weather Station which can be accessed through the internet Advantage : Extremely low budget Easily available hardware Easy to configure Hardware Components Required : NodeMCU – ESP 8266-12E BME280 I2C or SPI Temperature Humidity Pressure Sensor Breadboard Internet Subscription Required : Yaler.net   Hardware Details ESP8266 – NodeMCU 12E     BME/BMP 280 Sensor Bread Board               Jumper cables                           Pin Configuration Pin Number D3 ESP — > SDA Pin BMP/BME 280 Pin Number D4 ESP — > SDB Pin BMP/BME 280 Pin Number 3V3 ESP — > VIN Pin BMP/BME 280 Pin Number GND ESP — > GND Pin BMP/BME 280 Online Subscription for Domain Send an email to get an account by paying their fee. Once you get the user account note down your Relay-Host and Relay-Domain   Install Arduino (if you dont have) from https://www.arduino.cc/en/Main/Software   After installation Open the Arduino software. Tools –> Boards –> Board Manager       You can also download the Yaler library files from https://bitbucket.org/yaler/yalercontrib/downloads/YalerESP8266WiFiServer.zip   Once download copy to Arduino Library folder make sure your folder looks like […]

» Read more

Python – Check TensorFlow Using GPU

To check weather Tensorflow using GPU follow these steps:   from tensorflow.python.client import device_lib print(device_lib.list_local_devices()) If GPU support is not enabled you will see the output as follows If you have GPU support enabled then you will see the output as follows.   Run Below code to assign specific GPU to your code if you have multiple GPU   import tensorflow as tf with tf.device(‘/gpu:0′): a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name=’a’) b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name=’b’) c = tf.matmul(a, b) with tf.Session() as sess: print (sess.run(c))

» Read more

SB Admin 2 Bootstrap Theme – Visual Studio 2017

I have updated the SB Admin 2 theme to match with Visual Studio 2017 . I have also updated all the nuget packages related. Features SB Admin 2 Bootstrap admin theme, dashboard template, or webapp UI starter. The theme features a variety of custom jQuery plugins to add extended functionality past the built in Bootstrap UI features. Live Preview : https://blackrockdigital.github.io/startbootstrap-sb-admin-2/pages/index.html Mode Details : https://startbootstrap.com/template-overviews/sb-admin-2/ Download From GitHub: https://github.com/haneefputtur/HaneefSBAdmin2  

» Read more

Install 2 Whatsapp in One Android Phone – Parallel Space

We always carry two mobile phones just for sake of 2 different accounts. Sometime we face this challenge if we have dual sim mobile still we carry the second mobile for purpose of whatsapp. Hereis the solution which will help you to clone any app and run as a second user. Search For Parallel Space in Android Playstore Android Application : https://play.google.com/store/apps/details?id=com.lbe.parallel.intl&hl=en     Features : Clone and run multiple accounts of the same app simultaneously, and use themes to style your unique space. As one of the top-ranked tools on Android, Parallel Space helps more than 90 million users log on multiple accounts at the same time on one device and highlight their own style. It also protects user privacy by making apps invisible on device with the Incognito Installation feature. Moreover, users are able to customize themes of their cloned apps and the themes of Parallel Space to style their own space. Parallel Space supports 24 languages, and be compatible with most Android apps. Get Parallel Space immediately to manage multiple accounts, protect privacy, and customize your own space. ★Log in to multiple accounts of social networking apps or game apps at the same time on one device • […]

» Read more

Integrating Google Recaptcha to Webid – Auction Script

Webid do not have built in support for new google Recaptcha . If use enable Recaptcha of webid your registration form may not work. To resolve this follow below steps.   Step 1 : Register for google Recaptcha https://www.google.com/recaptcha/admin Enter google username and Password   Once you register google will provide a site key , please make a note of it. Step 2 : Open the file themes/modern/global_header.tpl     .. If you are using different theme use concerned folder. Add This line exactly before the >/head> tag <script src=’https://www.google.com/recaptcha/api.js’></script> Step 3 : Open themes/modern/register.tpl   and replace below code   Replace below code block after replacing the site key <div class=”form-group col-lg-12″> <div class=”capchabox”>{CAPCHA}</div> </div> <!– CAPCHA CODE –> <div class=”form-group col-lg-12″> <div class=”g-recaptcha” data-sitekey=”SITE KEY HERE”></div> </div>     Now login to webid panel and disable captcha setting to now as below.   Now you open the home page in webid admin panel and click on clear cache as below Now open the registration page you will see the new Google recapcha version 2 as follows    

» Read more

SignalR – Real-time web communication between Client and Server Easy c# [Part 1 of 2]

What is SignalR ? ASP.NET SignalR is a new library for ASP.NET developers that makes developing real-time web functionality easy. SignalR allows bi-directional communication between server and client. Servers can now push content to connected clients instantly as it becomes available. SignalR supports Web Sockets, and falls back to other compatible techniques for older browsers. SignalR includes APIs for connection management (for instance, connect and disconnect events), grouping connections, and authorization. Features of this exercise after you complete: # Send real time message to client without client refreshing the page # Receive real time communication or message from client without refreshing the page. #Send message to all connected clients. # Send message to specific client. # Send message to all client except one who sent it… # This is a proof of concept …. you can extend it to the way you want…   How to Install SignalR to MVC C# ? Steps : Open Visual Studio 2015 Create New MVC Project Install SignalR from Nuget Package  – Install-Package Microsoft.AspNet.SignalR -Version 2.2.2 Create SignalR Hub Create Owin Startup File Create A view and include SignalR library reference Test the Application Extend the functionality to the ActionMethod       Testing the […]

» Read more