Dec 27

Sometimes, when you get the starter kit and wanted to deploy it in a hosting provider, you get this issue with ASPNET.DBF. If you do, please follow these instructions from Microsoft to fix that issue.

 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/configaspnet_sql.asp


Aug 21

I recently started using phpBB for my use. It’s pretty decent forums application written in php and backed up by MySQL. There is little extra db based configuration to be fixed when you move the database. Please look at the following instruction copied from another site:

1. Backup the site with the following options:
Structure: Add DROP TABLE, Add AUTO_INCREMENT value
Data: Complete inserts, Extended inserts

Export Type: INSERT
Save as file (with newer versions you can also choose a name, whatever you like).

2. On the destination server, just restore this sql.

3. Fix config.php based on the new server name/userid/password

4. Update DB with path changes:

UPDATE phpbb_config SET config_value = ‘domain_name_here’ WHERE config_name = ‘cookie_domain’;
UPDATE phpbb_config SET config_value = ‘domain_name_here’ WHERE config_name = ’server_name’;
UPDATE phpbb_config SET config_value = ‘path_to_phpBB’ WHERE config_name = ‘cookie_path’;
UPDATE phpbb_config SET config_value = ‘domain_name_here’ WHERE config_name = ’script_path’;
Notes:

Now just upload everything to your new server.


Aug 04

I started looking for various free utilities or libraries to do zip/unzip. Finally found one and i would like to show you how to use it.

public static bool Unzip(string strFileName, string strExtractTo)
{
Stream stream = System.IO.File.OpenRead(strFileName);
return Unzip(stream, strExtractTo);
}

public static bool Unzip(Stream stream, string strPathToExtract)
{
ZipInputStream s = new ZipInputStream(stream);
ZipEntry theEntry;
while ((theEntry = s.GetNextEntry()) != null)
{
string directoryName = Path.GetDirectoryName(theEntry.Name);
string fileName = Path.GetFileName(theEntry.Name);

Directory.CreateDirectory(strPathToExtract + directoryName);
if (fileName != String.Empty)
{
FileStream streamWriter = System.IO.File.Create(strPathToExtract + “\\” + theEntry.Name);

int size = 2048;
byte[] data = new byte[2048];
while (true)
{
size = s.Read(data, 0, data.Length);
if (size > 0)
{
streamWriter.Write(data, 0, size);
}
else
{
break;
}
}

streamWriter.Close();

// Set date and time
System.IO.File.SetCreationTime(strPathToExtract + “\\” + theEntry.Name, theEntry.DateTime);
System.IO.File.SetLastAccessTime(strPathToExtract + “\\” + theEntry.Name, theEntry.DateTime);
System.IO.File.SetLastWriteTime(strPathToExtract + “\\” + theEntry.Name, theEntry.DateTime);

}

}
s.Close();

return true;
}

You can download the library from http://www.icsharpcode.net/OpenSource/SharpZipLib/Download.aspx


Jun 26

Problem

You open a presentation created on a Mac in your Windows version of PowerPoint and get a message similar to these:

QuickTime(TM) and a Photo - JPEG decompressor are needed to see this picture.
QuickTime(TM) and a TIFF decompressor are needed to see this picture.

The message may mention some other type of decompressor.

Solution

PPT2000: QuickTime PICT Placeholder Appears in Place of Graphic

The problem, in a nutshell, is that PowerPoint/Windows doesn’t support QuickTime compression; installing QuickTime on the PC won’t help.

You’ll need to go back to the Mac to fix the problem by re-inserting the graphic into PowerPoint.

  • Open the original graphic in the program that created it
  • Choose File, Save As
  • Select No Compression in the save options (PowerPoint will compress the image when it imports it)
  • Save as JPG or PNG or similar format that’s compatible with both PC and Mac PPT versions.
  • Switch to PowerPoint, choose Insert, Picture, From File and choose the newly saved picture.

Note: DO NOT drag and drop or copy/paste the graphic into PowerPoint. That’s what probably caused the problem in the first place.

These instructions are very generic. The menu options for your graphics program will be different; you’ll probably need to do some experimenting to find the right set of options.


Jun 20

Internet Explorer (based on Internet Explorer 5x)

  • This site incorporates the use of frames for optimal navigation.
  • With Internet Explorer, you can choose to print the page as it is laid out on screen, print the selected frame, or print all frames individually.
  • To do this, select “Print…” from the “File” menu.
  • From the “Print frames” group, please select the option which best suits your requirements.
  • To print the page as shown on screen (i.e. text and background color):
    • From the “Tools” menu, select “Internet Options.”
    • Select the “Advanced” tab and scroll down to the section called “Printing.”
    • Ensure that “Print background colors and images” is selected.
  • To conserve the toner/ink in your printer:
    • From the “Tools” menu, select “Internet Options.”
    • Select the “Advanced” tab and scroll down to the section called “Printing.”
    • Ensure that “Print background colors and images” is not selected.

May 24

Problem:

Request object error ‘ASP 0104 : 80004005′
Operation not Allowed

Solution:

Open your metabase.XML which is located in c:\Windows\System32\Inetsrv find the line “AspMaxRequestEntityAllowed” and change it to “1073741824″. This is 1GB - of course you can enter another value to suite your needs.

NOTE: Before you edit the file, be sure to stop the IIS service first or else you won’t be able to save the file.