Skip to content

Personal Web Starter Kit Bug

Microsoft’s personal web starter kit, included in Visual Studio 2005, contains two small bugs.
Issue 1: In the photos administration page the ObjectDataSource used for the CRUD (CreateRemoveUpdateDelete) operations does not provide any parameter declarations for the update and delete functions. Thus when trying to update or delete a photo you get an exception saying that the method call requires a parameter that’s not provided.

<asp:ObjectDataSource ID=”ObjectDataSource1″ Runat=”server” TypeName=”PhotoManager” SelectMethod=”GetPhotos” InsertMethod=”AddPhoto” DeleteMethod=”RemovePhoto” UpdateMethod=”EditPhoto” >
  <
SelectParameters>
    <
asp:QueryStringParameter Name=”AlbumID” Type=”Int32″ QueryStringField=”AlbumID” />
  SelectParameters>
  <
InsertParameters>
    <
asp:QueryStringParameter Name=”AlbumID” Type=”Int32″ QueryStringField=”AlbumID” />
  InsertParameters>
asp:ObjectDataSource>

Issue 2: If you install the database backend by running the script provided (personal-add.sql) in the PWS folder (usefull when you’re usind a shared hosting service) the EditAlbum and EditPhoto stored procedures have different parameter names than the ones provided in the Photos.aspx administration page (original_AlbumId and original_PhotoId is needed) causing a parameter exception when trying to update either an album or a photo.
CREATE PROCEDURE EditAlbum
@Caption nvarchar(50),
@IsPublic bit,
@AlbumID int
AS …
CREATE PROCEDURE
EditPhoto
@Caption nvarchar(50),
@PhotoID int
AS …

I’m sure that the people behind the SK have already noticed the problem and published or going to publish a fix for it. I just thought that I should let everyone know since I’ve already stumbled on them.

Published inASP.NETVisual Studio

Be First to Comment

Leave a Reply

Your email address will not be published.