Recipe Portal Starter Kit - ASP.NET 2.0 C# OOP 3-Tier SQL SP

Discussion in 'ASP.NET 2.0' started by Ex-designz, Jun 14, 2008.

  1. Hi Folks,

    I wrote an ASP.NET 2.0 C# OOP 3-Tier application - SQL 2005 stored procedure. This is a complete working application with fancy administration page. I would like to share this application to everyone who wants to learn or use the code for their project.

    I've spent many nights coding this app, and I would like to share this to everyone. Cuz, I was once a beginner myself wanted to learn.

    Kit Name: Cooking Recipe Portal

    URL Download: http://www.ex-designz.net/softwaredetail.asp?fid=1884
    I'm hoping that someone will find this app useful and will learn something new from it.


    Regards,
    Dexter Zafra
     
  2. Hi ciona,

    here is one site: http://www.recipespin.com/

    I'm in the process of moving the new version to a new account which I'm planning to get in the next month from Discountasp.net.

    Dexter
     
  3. DJE

    DJE

    Dexter,

    I love the look of this. I am thinking of using it for a simple community website.

    I am effecient in VB but am dabbling in C#. I have looked atsupporting code, googled the error and am unable to find why this is happening.

    Could you give me any guidance/advice on whyI cannot view on localhost?

    Thanks
    Doug Edwards

    I have downloaded and opened up in VWD 2005. Upon trying to view on localhost (view in browser)I get followingerror

    Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error:





    Code:
    Line 101:        DataTable dt = myBL.GetHomepageRecipeoftheDay;
    Line 102:        
    Line 103:        DataRow dr = dt.Rows[0];
    Line 104:
    Line 105:        lbrecname.Text = dr["Name"].ToString();
    Source File: c:\Users\Doug\Documents\Visual Studio 2005\WebSites\XDWorldRecipe\Default.aspx.cs Line: 103

    Stack Trace:





    Code:
    [NullReferenceException: Object reference not set to an instance of an object.]
       _Default.RecepiOfTheDay() in c:\Users\Doug\Documents\Visual Studio 2005\WebSites\XDWorldRecipe\Default.aspx.cs:103
       _Default.Page_Load(Object sender, EventArgs e) in c:\Users\Doug\Documents\Visual Studio 2005\WebSites\XDWorldRecipe\Default.aspx.cs:32
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       System.Web.UI.Control.LoadRecursive() +47
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
    
     
  4. DJE, what version of SQL server do you use? That line is to get the DataRow fo Recipe of the Day, and it return null. I would suggest try to view this recipe
    recipedetail.aspx?id=1366 and the Admin Recipe Manager Page. I cannot reproduced it on my development PC.

    Other posiblity coulb be the SQL user account don't have permission to execute stored procedure.

    Also Google it:
    http://www.google.com/search?hl=en&...o+an+instance+of+an+object&btnG=Google+Search

    Regards,

    Dexter Zafra
     
  5. DJE

    DJE

    Your response time is awesome. Thank you

    I am using SQLEXPRESS2005 with VWD 2005

    Yes, Isee it is calling the "recipeoftheday". I tried to view the 2 other pages but get errors with those as well.

    I have modified the connection string based on local settings

    web.config

    "Server=.\SQLEXPRESS;Database=Recipe;Trusted_Connection=True"

    inc_admindbconn.aspx - to same

    "Server=.\SQLEXPRESS;Database=Recipe;Trusted_Connection=True


    I will try some other options

    I will try toregister DB in localsetting using SQL server management tool express locally.

    I have aslo tried and will try usingthe ASP.NET configuration management.




    Use this page to select a provider for storing site management data.







    Provider






    <input id=ctl00_ctl00_ctl00_content_content_content_ProviderList_ProviderListGridView_ctl02_ProviderRadioButton type=radio CHECKED value=ProviderRadioButton name=ctl00$ctl00$ctl00$content$content$content$ProviderList$ProviderListGridView$ctl02$ProviderRadioButton><LABEL for=ctl00_ctl00_ctl00_content_content_content_ProviderList_ProviderListGridView_ctl02_ProviderRadioButton>AspNetSqlProvider</LABEL>
    Test i use the


    But of course this
    when i hit the test link i get an error

    Could not establish a connection to the database.
    If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.




    Again, thisall new as far as C# goes - it is probably operator error


    Thanks Dexter

    DJE
     
  6. Hi,
    SQL Server databases are not supported here but if you have a SQL Server 2005 addon you have access to an Attach feature.
    Please see this:
    http://iis7test.com/membershipprovider/
    Salute,
    Mark
     

Share This Page