Posts

A new threat to users on “Incoming Calls” – VISHING

Image
VISHING – a new way of hacking people, to steal amount from their bank account, credit card and similar. Recently, some people received a call on their mobile phone and affected. They lost approx. Rs. 80,000 within 05 minutes from their personal credit card account. This communication is to inform you and understand the scam to safeguard yourself. VISHING calls are drastically increased across India due to no/less awareness on this fraud. VISHING (Phishing through Voice) is a verbal communication (e.g. VOIP or phone calls) used by an unauthorized person "pretending" to be from reputable bank/company. Their aim is to manipulate individuals into revealing financial information or transferring money to them. How it happens? Hacker obtains information from various sources, e.g. social media, e-commerce sites, leaked database, unsecured app installed in user phone etc. Hacker calls victim and pretends to be an official from reputed organization, e.g. bank

Session Storage - a client-side state management technique

In web application development, storing values in client side has limited options and those have their own limitations. For example, it can be hard to store data manipulated using web scripting languages as jQuery, JavaScript etc. Most of the time user prefer to store such data in session variable, to avoid overhead calculation of data or reading it again from repository. HTML5 has introduced additional client-side state management variable called “session storage”. This is supportable to the browser which does support HTML5, as IE 8/above, Firefox 3/above, Safari 4/above etc. Session storage can store string type of variable in client side in simple and easy steps. Reading and writing in to session storage is quite simple. An example is shown below, please note the code is written using jQuery. Set a value in session storage: sessionStorage.setItem( "name" , “ Navin Pandit ”); Read a value from session storage: sessionStorage.getItem( "name&q

Failed to call controller method using AJAX in MVC 4 when deployed in IIS Server

Have you ever faced this issue in ASP.NET MVC? I found this issue after deploying my MVC application in IIS server, I shocked as it was working fine in local system but in hosting server it was not. Tried to search solution over the net but non of the solution worked for me. Finally I changed the URL verb and it was resolved. The detail of error is given below, hope it will be useful for someone. ERROR: Failed to load data..{"readyState":4,"responseText":....some HTML tag.. \r\n \r\n The resource cannot be found. \r\n \r\n SOLUTION: Solution is pretty simple, use "../" in your SRC instead of "~" symbol. Updated on https://www.codeproject.com/Answers/790566/Failed-to-call-controller-method-using-AJAX-in-MVC?cmt=914340

Exception: This document already has a 'DocumentElement' node Exception in C#

Image
While manipulating an XML file I came across with this exception and googled it out for solution. I found many stuffs but none of those were relevant and could not resolve my problem. After few minutes of analysis, I came to know that I was doing something wrong. I was trying to add element directly to XML document, which was not correct. It should be added within the root element. I changed my code accordingly and it was resolved. Full XML file and C# code is given below. Hope this will be helpful for others, and please feel free to add comments or any queries. XML file : C# code : XmlDocument doc = new XmlDocument ();             doc.Load( "xml_file_path" );             // Create new element:             XmlElement book = doc.CreateElement( "Book" );             // Create child elements:             XmlElement title = docDestn.CreateElement( "Title" );             title.InnerText = "Masterin

Microsoft message queue (MSMQ) in C# and .NET

Image
This article is written based on Microsoft Windows 7 using C# and .NET framework 2.0. Microsoft message queue (MSMQ) is one of the technique with which you can achieve communication between two application processes running in same machine, under Windows platform. To use MSMQ, you need to add reference System.Messaging explicitly in to your project and then you can avail its functionalities. Two very basic functions of MessageQueue class are Send() and Receive(). Send() method sends data to the message queue while Receive() method reads data from the message queue. Microsoft Windows OS have three types of message queuing techniques and those are: - 1. Outgoing queue 2. Private queue 3. System queue To view a queue, right click on MyCoputer -> Manage , expand Services and Applications and then expand Message Queuing .  All queue used to enlist here, under the respective category that you have chosen while creating a message queue. C# code t

Pointer in C#, use of unsafe keyword

In this article, we will understand the concept of pointers in C# and how we can use it in our C# code. While learning, I heard that C# does not support pointer which is not exactly true. It does support pointers but we do not have full control over it as in C++. Basically, to maintain type safety and security, C# does not support pointers but by explicit changes we can work with C# pointers. Use of 'unsafe' keyword By using ‘unsafe’ keyword, you can perform an operation that deals with pointers. Code or method used ‘unsafe’ modifier does not mean it is not safe but it is not verifiable by CLR. Unsafe code blocks are not dangerous but its safety does not verified by CLR, means if you are using pointers it is your responsibility to handle security risks and pointer errors. Unsafe keyword can be used with- methods, types or code blocks. Use of ‘unsafe’ keyword introduced security risks, as these are not handled by CLR and it is developer’s responsibility to manage al

Scroll bar disappears on minimizing of window - C# .NET winform

Introduction While working on windows based project, I found a strange issue - on minimizing of window to  task bar  and returning to its normal state by maximizing, some of its controls and scroll bar were disappearing. Those get displayed automatically on changing of window’s state or  re-sizing  of the form. I tried lots to find out its solution over internet but I did not found any good solution, what I found is that this is a .NET bug which has been fixed in framework 4.5, whereas I was using .NET framework 3.5, and therefore looking for alternate solution. For detail, you can visit: http://www.codeproject.com/Questions/124373/scrollbar-disappears-while-resizing-the-window Solution While discussing with my senior, I found a hint about to override base class method OnSizeChanged(). After fighting with code lines while RnD and using Visual Studio class editor help, I found the solution what exactly I was looking, and the solution is given below: protected override