Jake Ashcraft's WebLog

Personal Web Site Starter Kit (Beta2)

At first glance the Personal Web Site starter kit (PWSK) appeared to be really cool for beginners. I decided that I was going to create a site with the PWSK for my daughter. Because the starter kit boasted some nice out of the box features such as manageable photo albums.

So I got some hosting setup, created the site, and copied the files over and come to find out, Crystal Tech doesn't support SQL Express. So I reproduced the required databases for SQL 2K and got it working. Well, at least it appeared to be working. Shortly after adding photos, logging in and out, the system began to error out. I would receive the following error.

Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.

After some investigation it appears that in the PhotoManager.cs class all connections being opened are never closed. So I made some modifications to the functions and copied the new version up. Well, so far so good. Everything is working fine, connections are ok but now I have discovered another problem. I uploaded about 25 photos. In the PWSK all photos are stored in the Photos table. My 25 photos consume roughly 11MB. Well, much to my surprise, when you navigate to the main page, some initialization takes place and it loads all the photos into memory from the first photo album. This really sucks because not I have to sit and wait for all photos to download.

So in the meantime I will work around this by having my first photo album contain only 1 or 2 photos in it. Needless to say, I am a little disappointed.

I would be interested to hear in anyone else's experiences with this.

 

 

Comments

Eric Newton said:

sounds like some quality coding there
# April 25, 2005 1:11 AM

CZoneSoft said:

how about only stored images's url in db,not binary data. and distill asynchronously.
# April 25, 2005 2:42 AM

TrackBack said:

# April 25, 2005 4:41 AM

Gareth Brown said:

I downloaded the beta start kits last week and looked through them, and to be honest I was very disappointed.

The code is not what I was expecting from Microsoft! What standards are we meant to work to?
# April 25, 2005 5:42 AM

Vurg said:

Even the time-tracker and the club site starter kits have their share of problems. The projects won't compile from the start because of namespace mismatch and/or mistyped classes. I know these require just minor edits but come on, at least test the thing before packaging it.
# April 25, 2005 8:34 AM

Jake said:

Yes, I am very disappointed. And to think that MS just posted an article on the personal web site. How could they not know of its issues? If you look through the PhotoManager.cs you will see that whenever you create a new instance of the class, the constructor creates a new connection to the DB even though there are a couple functions that don't do any DB interaction. Apparently the Patterns and Practices group and the starter kit group are not talking. I mean, the whole point of the starter kit is to show off how cool .Net 2.0 is and how robust it is but in fact it is the opposite. I haven't looked into the other starter kits you mentioned but I am not surprised that they share the same problems.

Jake
# April 25, 2005 12:21 PM

Martin Ennemoser said:

I just stumbled over this issue regarding connections left open in the PhotoManager class. That's a real shop-stopper. It took me 2 hours to find out that the mantra "open late, close early" is obviously not something that's known by all Microsoft employees. Seems to me that only junior level developers are hired for writing such sample code. Too bad that this same faulty code is reused by thousands of developers, believing that something Microsoft provides as a guiding example cannot be wrong.
# May 10, 2005 7:36 AM

mark_cabrejas said:

grdgfgfr

# January 29, 2010 9:10 AM

Buy cheap software said:

M98S82 I envy you. The content and design of your blog is much better than mine. Who made a design for you?!...

# September 25, 2011 6:52 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)