You can obtain the web site in Releases area.


  1. File system
    1. Create a directory in your local file system for storing photos;
    2. Update repository entry in App.config to specify the above directory.
  2. Database
    1. Connects to a database server;
    2. Run the photodb.sql in Scripts directory of the web site directory.

Add New Photo

  1. Launch the web application;
  2. Click Add Photo button on the upper right corner of the Homepage; Homepage.bmp
  3. Enter name and select a photo then click Ok button; AddPhoto.bmp
  4. The new photo is now listed in the Homepage. After-Added-Photo.bmp

Test Commit

  1. Launch the web application;
  2. Click View on a item listed in the Homepage; After-Added-Photo.bmp
  3. Click Delete button; Photo-Detail.bmp
  4. The item was removed from the list in the Homepage; Homepage.bmp
  5. The file was removed from the local file system. empty-folder.bmp

Test Rollback

  1. Launch the web application;
  2. Click on View on an existing item in Homepage; Homepage.bmp
  3. After being directed to Photo detail page, run the following script to change the location information of the image in the database: update photos set url = 'C:\Photos1\simplefs-architecture.bmp'
where photoid = 19 update-database.bmp
  1. The url should be a non-existed directory;
  2. The photoid is the ID of the photo you selected;
  1. Now comes back to the Photo detail page, click Delete button; Photo-Detail.bmp
  2. Error page appears claiming the file cannot be found and the transaction rollback; Error.bmp
  3. Click Photos button back to the Homepage;
  4. The item you selected is still there but the location is updated to a non-existed one. After-Fail-Delete.bmp
  5. The file on local file system still exists and does not deleted. file-system.bmp


Last edited Jan 17, 2008 at 3:49 AM by samhuang, version 7


No comments yet.