Personal Web Starter Kit Bug

50 sec read

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.

Cloud development with Azure and Visual Studio

This session is so awesome, I just had to post it here so that I can play it over and over again… What great...
kpantos
5 sec read

Microsoft Visual Studio 2012 is here customize it to…

With the virtual launch of Microsoft Visual Studio 2012 coming up in a few days at September 12, 2012 9:30 AM PDT (UTC -8:00)...
kpantos
35 sec read

StressStimulus stress testing tool

If you ever created a professional website/application you’ll probably know the value (you’ve probably learned it the hard way as I did ) of...
kpantos
26 sec read

Leave a Reply

Your email address will not be published. Required fields are marked *