If you’re using Microsoft ASP.NET AjaxToolkit’s AsyncFileUpload placed inside a webform nested in a master page, chances are you’ll be faced with a baffling error message “The file attached is invalid”. No amount of manual troubleshooting and breakpoint-ing help because there’s no complete error messages (or even any that makes sense). The reason: The client [...]
Developers new to Active Directory programming might find it frustrating that the ActiveDirectoryMembershipProvider example codes provided by Microsoft does not seem to work, at least on Windows 2008 R2 with ASP.NET 4.0 using “logon” usernames eg. “administrator”, “domain\joe”. The reason is because the ActiveDirectoryMembershipProvider by default maps username to as UPN username (User Principal Name, [...]
Ever wanted to grab the output of a command via C++? In PHP, we are all very familiar with @exec and popen, but what about C++? Try this: string cmd = “/usr/bin/netstat -na”; string OutString; FILE *FileStream; char stdbuffer[1024]; FileStream = popen(cmd.c_str(), “r”); while (fgets(stdbuffer, 1024, FileStream) != NULL) OutString.append(stdbuffer); pclose(FileStream); The first 3 lines [...]
Surprisingly, one of the most useful extension to Microsoft Visual Studio goes largely unnoticed: Visual Basic PowerPack. Think of Visual Basic PowerPack as the managed code reincarnation of a collection controls that made life easy on VB6 but were dropped since VB7: Controls include PrintForm, LineShape, OvalShape, RectangleShape and DataRepeater. Oh those good old days are back!