by admin on November 18, 2009
Today I came across a problem with Visual Studio 2008 installation program. The following error occurred when I tried to add/remove Visual Studio components via control panel:
A selected drive is no longer valid
This error occurs after installation of Visual Studio 2008 SP1 (Service Pack 1), so you can no longer add or remove components of the install.
In order to fix this error, you have two choices:
1. Uninstall SP1 via control panel, add necessary components to non-SP install, then apply SP1 again.
2. Locate and install required component manually. I was looking to add SQL Server Express Edition to my install. I found it at “\WCU\SSE\SQLEXPR.EXE” in Visual Studio 2008 installation folder (unpacked .ISO). This should work for other components accordingly.
by admin on November 10, 2009
I had to add file management capability to one of my projects and encountered a serious issue. AjaXplorer FAQ says the following:
How can I filter some file extensions, both for display/download and for upload?
For the upload part, it’s not done via configuration, but you can easily hack one file to suit your needs. Open the file client/html/flash_tpl.html at line 8 :
You can see :
>> $FlashVar = ‘&fileTypes=*.*&fileTypeDescription=All%20files&totalUploadSize=’.$confTotalSize.’ [.... end of line]
You can edit the « fileTypes » and « fileTypeDescription » variable using for instance the following syntax :
>> [...]&fileTypes=*.doc;*.jpg;*.gif&fileTypeDescription=My%20Type%20Description&[...]
However, the above method in not secure.
In AjaXplorer customization, if you need to *really* filter out files based on file extension, you have to customize the storage plugin. In my case “access.fs”, class.fsAccessDriver.php script. I wrote the following code to accomplish this task:
if($fancyLoader) $userfile_name = SystemTextEncoding::fromUTF8($userfile_name);
//Filtering code here
if ( !preg_match('/.*.(avi|flv|mpeg|mpg|wmv|divx)$/i', $userfile_name, $matches) )
{
$errorMessage="You can upload video files only";
break;
} |
This code will filter files on the server side and generate pop-up error if extension is not permitted. Furthermore, it works with non-flash uploader.
5 Common .NET Mistakes
September 11, 2009This time I’m going to name 5 most common reasons of errors in .NET programming.
This is something that experienced programmer should avoid. Let’s proceed.
Incorrect multithreading
Most of developers want to enhance their applications with multithreading capabilities. For some projects such enhancements are beneficial, however, they might be a burden for others. Furthermore, poorly written multi-threading code [...]