I am working on a project allows user to upload files to server and download uploaded files from server. It is simple and straight-forward: the file is save in file system, and the file path is saved in database. When user requests to download a file, the file path is returned from the database and user is prompted with the save file dialog to save the file. Everything has been working well, then suddenly one […]
Tips & Tricks
After I uninstalled MS SQL Server “Denali” CTP3, my Task Manager cannot be launched. Every time I try to launch it, it gives me an error: Windows cannot find ‘C:\Windows\system32\taskmgr.exe’. Make sure you typed the name correctly, and then try again. How to fix it? Before I installed SQL Server “Denali”, I used Process Explorer to replace my Task Manager, and it seems that the uninstallation of “Denali” messed up Process Explorer. But since Task […]
If you use Windows XP Mode and make any change in your BIOS, then you may notice that next time when you try to launch Windows XP Mode, you will get an error message as this: Windows XP mode could not be restored because of either host processor mismatch or lack of hardware assisted virtualization support in the system. The reason is that by default when you close Windows XP Mode, Windows Virtual PC will […]
Last week I finally decided to transfer this domain away from GoDaddy to a different registrar. I thought the process should be smooth and painless, but it turned out not. My site suffered several days of down time, as a result, lost a lot of traffic. Here are some experiences I would like to share with you: 1. My domain was not hosted by GoDaddy, and I changed the DNS nameservers before the transfer is […]
This step by step tutorial will show you how to use .NET ReportViewer to create addressing labels, such as Avery addressing labels. I hope this tutorial will help someone who has the same problem as me. Prerequisite: You have the correct data retrieved from database. I will not spend time on how to get your data from your database. This tutorial uses addressing label with size of 1” X 2-5/8”, three columns, 30 labels per […]
I wrote a simple parameterized query the other day against an Oracle database as follows: SELECT DISTINCT E.ID, E.Name, E.Department FROM Employee E WHERE E.ID = :uid Then in my application, I assign the value to the parameter as follows: cmd.Parameters.Add(new OracleParameter(":uid", OracleDbType.Varchar2)); However, when I was trying to run my application, I got an error saying: ORA-01745: invalid host/bind variable name Can you see what is causing the error? It took me hours of […]
NOTE: After chatting with PreEmptive support, I was told that the Command Line Interface of Dotfuscator CE does not support Visual Studio 2013 or lower. It only supports, at the time of this note, Visual Studio 2015 and 2017. In this post, I will show you how to use PreEmptive Dotfuscator Community Edition in Visual Studio 2010 setup project to protect your source code. By default, PreEmptive Dotfuscator CE is integrated in Visual Studio 2010, […]
This tutorial demonstrates the use of Microsoft SQL Server Management Objects with a custom action in Visual Studio Setup project to deploy a database for your application. It is based on my development of Good Steward Express Edition application which can be downloaded at http://www.sardonyxtech.com/products.aspx References: MSDN article: Walkthrough: Using a Custom Action to Create a Database at Installation Handling “GO” Separators in SQL Scripts – the easy way Step 1. Create an installer class […]
Have you ever encountered this error when trying to open a typed dataset (.xsd) in Visual Studio 2010: To prevent possible data loss before loading the designer, the following errors must be resolved: Object reference not set to an instance of an object. The cause of this error is the .xsc file under the typed dataset is corrupted or damaged. If you expand the typed dataset in Solution Explorer, you will see the file: To […]
I have been working on a project that needs to encrypt and decrypt the query string of a page, and I get the “invalid length for a base-64 char array” error intermittently. Thanks to this post (the third reply by Kagisho), I got the error fixed. But what caused this error? And why does it not happen all the time? Here is my encryption function and decryption function: private string EncryptString(string inString) { RijndaelManaged sysAlg […]