Search Articles :
 
HyperLink

 
Latest Articles
Using the Wizard control of ASP.NET
Using Site Maps to provide web site navigation
Using Extension Methods
Working with Binary Large Objects (BLOBs) Using SQL Server and ADO.NET
Using LINQ in ASP.NET (Part 4)
Tip: Fetching Random Rows From SQL Server
Using LINQ in ASP.NET (Part 3)
Using LINQ in ASP.NET (Part 2)
Using LINQ in ASP.NET (Part 1)
Getting Started with IIS7 (Part 2)
 
Latest Blog Posts
Using Extension Methods
Working with Binary Large Objects (BLOBs) Using SQL Server and ADO.NET
भाग 4 : मी नोकरी सोडतो
Using LINQ in ASP.NET (Part 4)
देवाच्या डाव्या हाती (भाग 3)
Using LINQ in ASP.NET (Part 3)
देवाच्या डाव्या हाती (भाग 2)
Using LINQ in ASP.NET (Part 2)
Beginning XML with C# 2008: From Novice to Professional Published!
देवाच्या डाव्या हाती (भाग 1)
   

Hosted By DiscountASP.net
Developer's Guide to ASP.NET 3.5
Master ASP.NET 3.5 development using C# and Visual Studio.NET 2008. Web forms, server controls, data binding, AJAX, ASMX and WCF services and more...
Beat stress - learn Kriya Yoga Meditations
A six week online course in our style of Kriya Yoga is available absolutely FREE. Very few websites teach you the ancient art and science of Kriya Yoga in such a systematic and authentic manner.

Share photos with your own Photo Gallery

A photo speaks for thousand words. You preserve memories of pleasurable, happy and joyous moments of your life in photos. You also want to share such moments with your friends, relatives and family members. Photo gallery is a natural place where you share your snaps with others. This series of articles will demonstrate how one can build a photo gallery complete with categories, thumbnails and security using ASP.NET 2.0 and SQL Server 2005. In this part we start with database design and few utility classes.

Features

  • Create albums
  • Albums can be public or private
  • Browser based image upload
  • SQL Server 2005 as image store
  • Add title and description to photos
  • Generate thumbnails of photos

System Requirements

  • ASP.NET 2.0
  • SQL Server 2005 Express Edition
  • Visual Studio 2005 or Visual Web Developer Express Edition

Installation Instructions

  • Download the associated ZIP file
  • Unzip in a folder
  • Open Visual Studio 2005
  • Using File - Open Web Site menu option locate the folder where you unzipped the files
  • Customize if required and run

NOTE: The download includes SQL Server 2005 database (see App_Data folder).

Screen Shot



Associated Links
Download Source Code

Posted On : 08 Feb 2007
Current Rating :
Rate This Article :

About the Author
Bipin Joshi
Bipin Joshi is the proprietor of BinaryIntellect Consulting where he conducts premier training programs on .NET technologies. He wears many hats including software consultant, mentor, prolific author, webmaster, Microsoft MVP and member of ASPInsiders. Having adopted Yoga way of life Bipin also teaches Kriya Yoga to the interested individuals. His detailed profile can be read at his blog. He can also be reached there.


Comments on this post are closed!

Comments
This is what I was looking for
I am newbie in ASP.NET. This is what I was looking for. Thanks for sharing this sample.
Posted By : Bob Posted On : 3/6/2007
Great Job !!!!.
I just have one question. It seems that uploaded images loose quality, is this a expected behaivor?, how could I improve this problem?. Thanks in advance !!!
Posted By : Carlos Lone Posted On : 5/17/2007
Re Admin Section
Dear Bipin,

i have few queries
1) How do we go into admin section.
2) which is the default page
3) where is user id and password stored
4) what is the uid/password for the admin ( if you have created any)
5) How and Where do we define the roles for the normal user and admin

Thanks !
Posted By : Neeraj Posted On : 7/16/2007
Re: Re Admin Section
Anytime you refer samples of this web site first thing you should check is the database supplied in App_Data folder. Then use WAT tool and add users/roles as per your requirement. Not all samples have uid/pwd ready but you can always add your own.
Posted By : Bipin Joshi Posted On : 7/17/2007
image gallery
i am looking for the same solution but for C# ASP.NET 1.1, can you please help!
Posted By : eyad Posted On : 8/16/2007
Image Quality
I ha the same problem with the quality and found a fix. In GetPhoto.asp.cs, change line 37 to " photo.Save(Response.OutputStream, ImageFormat.Jpeg);"

this changes the output from Gif to Jpeg and gets a nice clean image.

Awesome sample, alot of help!!
Posted By : Liam Posted On : 9/6/2007
databes error
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Posted By : ramy Posted On : 9/14/2007
Re: databes error
This typically indicates wrong connection string. Just check the connection string from web.config and modify it as per your setup. Note that the sample is developed with SQL Server 2005 express edition.
Posted By : Bipin Joshi Posted On : 9/14/2007
Membership control
I made a username and password with asp.net configuration tool but when i upload all the files to the IIS, it always says that it failed to log me in. What should I do to fix this
Posted By : aj Posted On : 10/6/2007
Membership control
I made a username and password with asp.net configuration tool but when i upload all the files to the IIS, it always says that it failed to log me in. What should I do to fix this
Posted By : aj Posted On : 10/6/2007
Problem
I have a problem, i downloaded the code on the desktop, and then tried to run both JobsitesStarterKit as well as photo gallery, but it shows an error:

Error 62 C:\Documents and Settings\rajesh.patil\Desktop\AjaxDemoDownloads\JobsSiteStarterKitBinaryIntellect\CSCode\PhotoGallery\Code\displayphoto.aspx: ASP.NET runtime error: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. (C:\Documents and Settings\rajesh.patil\Desktop\AjaxDemoDownloads\JobsSiteStarterKitBinaryIntellect\CSCode\PhotoGallery\code\web.config line 7) C:\Documents and Settings\rajesh.patil\Desktop\AjaxDemoDownloads\JobsSiteStarterKitBinaryIntellect\CSCode\PhotoGallery\Code\displayphoto.aspx 1 1 C:\...\PhotoGallery\
Error 63 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. C:\Documents and Settings\rajesh.patil\Desktop\AjaxDemoDownloads\JobsSiteStarterKitBinaryIntellect\CSCode\PhotoGallery\Code\web.config 7

and the following line is highlited on clicking on the error line:

<roleManager enabled="true" />

I have created an virtual directory, and have given the application name by going to the properties of the virtual directory and also mapped the virtual directory to the correct path, i have local SQL 2005, so please tell me the solution.
Posted By : Rajesh B Patil Posted On : 10/18/2007
Re: Problem
First of all open both the applications in VS.NET as a File System based sites and then try running from VS.NET. This will make clear where is the problem. I have both of them working correctly at my end. My guess is that your individual folders i.e. one for jobs application and one for photo gallary are not marked as IIS application. By any chance you marked their parent folder as IIS application instead of individual folders?
Posted By : Shiva Posted On : 10/19/2007
Thanks
thanks you for sharing such helpful projects
with the help of this, i learn lot of things.

Thank You :)
Posted By : Qureshi Posted On : 1/2/2008
Can you tell me if there are any limitations with regard to the database size?
When I upload a large number of pictures, and the database grows to about one gig, everything slows to the point where it appears stopped. The SQL Server is running at 100% cpu, and the website is non-responsive.
Posted By : Cameron Posted On : 3/19/2008
Query regarding database selection
Can i use other version of sqlserver 2005 instead of sqlexpress 2005 because i dont have sqlexpress 2005, i got enterprize edition 2005
Posted By : Sanjay kumar giri Posted On : 6/24/2008
Re: Query regarding database selection
Yes. You can. Just attach the supplied database with your SQL server and change connection string from web.config file.
Posted By : Aditya Posted On : 6/24/2008
Copyright (C) BinaryIntellect Consulting. All rights reserved.
Contact Us
Read Terms Of Use