I know that others have faced the same problem as me when it comes to using Personal Web Site Starter Kit (PWS) with their hosting provider because of limited database space.  I have used 1and1 and GoDaddy and both of them offer a small amount of space within the included SQL Server database(s), but an abundance of file system space.  The photo albums were my primary reason for using PWS, but I did not want to spend a lot of time making it useable.  I ended up making some quick & dirty modifications to the PWS code to save the image files to the file system instead.  The various sizes of the photos are all saved to the file system as shown:

 photo listing

Here are the changes I made:

  1. Add a "Photos" folder to the root of the application.  This is the folder where the photo files will be stored.  (You will need to set Write permissions on this folder.)
  2. In the "Personal" database, delete the Tables ("photos", "albums") and all the Stored Procedures.  Then, run the modified "personal-add.sql" script below.  This modified SQL script will create new tables without fields for the actual files and new procedures modified as needed because the photos are being saved to the file system.
  3. Replace the "PhotoManager.vb" file with the one below. This modified class has the necessary changes to handle managing photo files on the file system, rather than in the database.
  4. Replace the "Handler.ashx" file with the one below.  This modified class has a single change to explicitly close the Stream object which can cause problems if a photo is being deleted.

Modified_personal-add.sql (3.41 kb)

Modified_PhotoManager.vb (13.79 kb)

modified_Handler.ashx (1.87 kb)

 After completing this, I found this post with another set of modifications that it looks like it uses a little different approach.