If you accidentally delete some files in your EC2 , you don’t want to restore the whole volume, you just want to restore some files on it. The easiest way to do this is to mount the backup volume to a different EC2 and mount it from there. In case you want to mount that backup volume to the same server and you want to mount it to a different mount point to copy. There will be a challenge for you. Since the backup snapshot will have the same UUID with the existing file system , you will not be able to import it. YouRead More →

In ASP.Net, ViewState is used to store the state of your web page controls between post backs. You can see this value by viewing the html source code and search for ViewState. This value is encrypted by default to prevent tampering and maintain its integrity. There are 2 encryption levels: base64 and 3DES. The setting is control in this config: viewStateEncryptionMode If it’s encrypted with base64 you can easily decrypt, if it’s 3DES, there is no way as i know so far.Read More →

You setup a new website, everything looks good. You were advised to setup a probe to monitor your application. You did, days by days the application works great, you look at your monitoring report , things are normal. One day, you receive an alerts saying your application is not accessible. When you visit your application, it seems fine. Something wrong with the monitoring you setup? It could be , but if you take a deep dive , you see that your application is receiving a huge load from random IPs. You know that there must be something wrong going on, when you review all theRead More →

By default, when you deploy an application to Azure App Service plan – your default web location will be under /home/site/wwwroot . /home/ is a persistent storage which means if you restart your application, your data will be still there. The problem with /home folder is that, it’s actually a network folder , which means every time you want to access files on this folder, it will do a network call. Some applications using some framework like Symfony , their library is huge, they read a lot of files , this will cause your application is very slow to respond. How do we fix this?Read More →

My advice is if you have a growing fast/busy table, you should keep it below 4GB, if it’s over 4GB, you should find away to archive it. This will need some helps from the code as well. Why shouldn’t you let it growing more than 4GB? It’s because sometimes your server crash, mysql might need to recover/repair the table. If the table is too big, it will take a lot of time to repair. While the table is repairing, you will be unable to access that table, this will put everyone in a long queue. Just imagine that you have a busy and it takesRead More →

var waiting_text=”Basic Data”; var max_waiting_time=30;//seconds for(i=0;i<max_waiting_time;i++) { body_text= await driver.findElement(webdriver.By.tagName(“body”)).getText(); if(body_text.includes(waiting_text)) { console.log(“Found required text[“+waiting_text+”] at the “+i+”th seconds, exiting the waiting “); break; }else{ await commands.wait.byTime(1000); } } if(i>=max_waiting_time) { console.log(“Coul not find text[“+waiting_text+”] at the “+i+”th seconds, exiting the waiting “); }Read More →