How to install ASP.NET 2.0 Club / Personal Starter kit?

Discussion in 'ASP.NET Starter Kits' started by Bruce, Dec 10, 2005.

  1. Hi,
    I got your e-mail and have looked at your SK code files and the SQL DB.
    Seems the Club SK site, if you use the SQL Server,is missing some site settings.
    Apparently the original version assumed the user would be using SQL Express.
    Salute,
    Mark

    UPDATE: Just sent you an e-mail message.

    After digging into this I highly recommend anyone using the Club SK to get this updated Codeplex project:
    http://www.codeplex.com/ClubStarterKit


    Post Edited (wisemx) : 6/21/2008 12:57:25 PM GMT
     
  2. I don't think I ever received the email that you sent earlier...do you mind resending it.

    Thanks
     
  3. Sure...Just sent it again to your yahoo.com address.
     
  4. I?m trying to figure out how to go about modifying the graphics and text for the club site starter kit. I know that I would need to update the default.master file so that all of my pages look the same, but I can?t figure out where in the code to make the change or to change the pic that?s displayed in the header. Then I thought that the style sheet would be the place, but again I was wrong. Can someone let me know where in the code to make the change so the I can delete the pic (soccer ball) that?s in the header of every page? Below is the code to the default.master file and the style sheet

    Default.master file

    <%@ Master Language='VB' %>

    <%@ Register TagPrefix='ClubSite' TagName='HitCounter' Src='~/UserControls/HitCounter.ascx' %>

    <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
    'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
    <script runat='server'>

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

    If Not (IsPostBack) Then
    ActivateUsers.Text = Application('activeUsers').ToString

    Dim ClubName As String = ConfigurationManager.AppSettings('ClubName')
    Dim ClubSlogan As String = ConfigurationManager.AppSettings('ClubSlogan')
    Dim ClubAddress As String = ConfigurationManager.AppSettings('ClubAddress')
    Dim ClubCopyright As String = ConfigurationManager.AppSettings('ClubCopyright')

    If Not (ClubName Is Nothing) Or ClubName <> '' Then
    Label_ClubName.Text = ClubName
    masterhead.Title = ClubName
    Else
    Label_ClubName.Text = 'My Club Site'
    masterhead.Title = 'My Club Site'
    End If

    If Not (ClubSlogan Is Nothing) Or ClubSlogan <> '' Then
    Label_ClubSlogan.Text = ClubSlogan
    Else
    Label_ClubSlogan.Text = 'My Club Site tag line or slogan'
    End If

    If Not (ClubAddress Is Nothing) Or ClubAddress <> '' Then
    Label_ClubAddress.Text = ClubAddress
    Else
    Label_ClubAddress.Text = 'Club Address here'
    End If

    If Not (ClubCopyright Is Nothing) Or ClubCopyright <> '' Then
    Label_Copyright.Text = ClubCopyright
    Else
    Label_Copyright.Text = 'Copyright &copy; 2007 My Club Site. All Rights Reserved.'
    End If

    End If

    If Page.User.Identity.IsAuthenticated Then
    Membership.GetUser(Membership.GetUser.ProviderUserKey(), True)
    End If
    End Sub
    </script>
    <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en' >
    <head id='masterhead' runat='server'>
    <title>Greater Mt Olive Overcoming Church of GOD</title>

    <link rel='alternate' type='application/rss+xml' title='News' href='~/RSS/NewsRss.aspx' />
    <link rel='alternate' type='application/rss+xml' title='Events' href='~/RSS/EventRss.aspx' />
    <link rel='alternate' type='application/rss+xml' title='Blog' href='~/RSS/BlogsRss.aspx' />
    <link rel='alternate' type='application/rss+xml' title='Forums' href='~/RSS/AllPostsRss.aspx' />
    <link rel='alternate' type='application/rss+xml' title='Photo Albums' href='~/RSS/AlbumsRss.aspx' />
    </head>

    <div id='poster'>
    <h1>

    ******Here is the Text I need to add in the header ********************
    <asp:Label ID='Label_ClubName' runat='server' >Welcome to Greater Mt Olive
    Overcoming Church of GOD</asp:Label>
    </h1>
    <h2>
    <asp:Label ID='Label_ClubSlogan' runat='server' >'WHERE WE'RE GOING PLACES IN
    GOD WE'VE NEVER GONE BEFORE....TOGETHER'</asp:Label>

    ***********************************************************************

    </h2>
    </div>
    <div class='none'>
    <a href='#content_start'>Skip Repetitive Navigational Links</a></div>
    <div id='navtop'>
    <asp:SiteMapDataSource ID='SiteMapDataSource1' runat='server' ShowStartingNode='false' />
    <asp:Repeater ID='TopNavRepeat' runat='server' DataSourceID='SiteMapDataSource1'>
    <HeaderTemplate>
    <ul>
    </HeaderTemplate>
    <ItemTemplate>
    <li>
    <asp:HyperLink ID='HyperLink1' runat='server' Text='<%# Eval('Title') %>' NavigateUrl='<%# Eval('Url') %>'
    ToolTip='<%# Eval('Description') %>' />
    </li>
    </ItemTemplate>
    <FooterTemplate>
    </ul>
    </FooterTemplate>
    </asp:Repeater>
    </div>
    <form id='form1' runat='server'>
    <asp:ContentPlaceHolder ID='ContentPlaceHolder1' runat='server'>
    </asp:ContentPlaceHolder>
    </form>
    <div id='navbottom'>
    <asp:Repeater ID='BottomNavRepeat' runat='server' DataSourceID='SiteMapDataSource1'>
    <HeaderTemplate>
    <ul>
    </HeaderTemplate>
    <ItemTemplate>
    <li>
    <asp:HyperLink ID='HyperLink1' runat='server' Text='<%# Eval('Title') %>' NavigateUrl='<%# Eval('Url') %>'
    ToolTip='<%# Eval('Description') %>' />
    </li>
    </ItemTemplate>
    <FooterTemplate>
    </ul>
    </FooterTemplate>
    </asp:Repeater>
    </div>
    <div id='footer'>
    <asp:Label ID='Label_ClubAddress' runat='server' Text='Label'/>

    <asp:Label ID='Label_Copyright' runat='server' Text='Label'/>
    Number of users on the site (<asp:Label ID='ActivateUsers' runat='server'></asp:Label>)
    <ClubSite:HitCounter ID='HitCounter' runat='server' />
    </div>
    </body>
    </html>


    Style Sheet Code
    div.foot{ text-align:center; }

    .eventmonth h3
    {
    padding-left: 20px;
    padding-right: 20px;
    }

    .eventlist label
    {
    font-weight: bold;
    padding-right: 4px;
    }
    .eventmonth
    {
    width: 694px;
    margin-right: auto;
    margin-left: auto;
    margin-bottom: 10px;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 10px;
    }

    /* used as the cssclass of the actual calendar */
    .eventmonthtable
    {
    width: 694px;
    margin-right: auto;
    margin-left: auto;
    position: relative;
    margin-bottom: 15px;
    border: 1px solid #DBDB79;
    border-collapse:collapse;
    }


    .dayNumber
    {
    float: right;
    border-bottom: 1px solid #C7C272;
    border-left: 1px solid #C7C272;
    clear: none;
    padding: 2px;
    }


    .calcurrentmonth
    {
    /* no styles needed at this time */
    }
    .calothermonth
    {
    background-color: #DCD78E;
    }
    .calcurrentday
    {
    background-color: #FFFFC1;
    }
    .calweekend
    {
    background-color: #FEEB95;
    /* width: 15%; */
    }

    .calcurrentmonth , .calcurrentmonth , .calothermonth , .calcurrentday , .calweekend
    {
    text-align: left;
    border: 2px solid #C7C272;
    height: 60px;
    vertical-align: top;
    /* needed for positioning the dayNumber part */
    position:relative;
    border-collapse:separate;
    border-spacing: 5px;

    }
    .eventlistdate
    {
    padding-right: 4px;
    }
    .eventlisticon
    {
    text-align: center;
    }
    .eventlisttime
    {
    text-align: center;
    width: 95px;
    }
    .eventlistevent
    {
    font-weight: bold;
    }
    .eventlistlocation
    {
    /* no styles needed at this time */
    }
    .eventlist td
    {
    padding-bottom: 4px;
    }
    .button
    {
    cursor: hand;
    background: transparent url('../images/button.png') no-repeat 0% 0%;
    padding: 0;
    width: 123px;
    height: 40px;
    border: none;
    overflow: hidden;
    font: corbel;
    font-size: 17px;
    color: #454545;
    padding-bottom: 5px;
    }
    .button:hover {
    background: transparent url('../images/button.png') no-repeat 0% -40px;
    }
     
  5. Hi,
    You see the DIV with ID of "poster"?
    It loads a class from the App_Themes\ClubSite folder, Format.CSS
    In that CSS file the DIV "poster" is:

     
  6. Thanks Mark. Now can you tell me how to get the text to show up in the header. Even when I take the pic out, my text still isn't displaying in the header as I would like. Can you tell me how to get around this. Also when I try to log into my site online, I get the following error.



    Server Error in '/' Application.
    The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.
    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.Configuration.Provider.ProviderException: The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ProviderException: The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.]
    System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +589
    System.Web.Security.SqlMembershipProvider.CheckSchemaVersion(SqlConnection connection) +85
    System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121
    System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105
    System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
    System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83
    System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160
    System.Web.UI.WebControls.Login.AttemptLogin() +105
    System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
    System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
    System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746


    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
     
  7. How did you get the data on the DASP SQL Server up until this point?
    Please be as specific as possible, including which SQL Server addon you have here.

    Something I'd also like to know is, are you aware that there are two data files scripted for this kit?
    (Data.sql and Schema.sql)

    As for the text, you can place text in that same area just by using normal html.
    For example:
     
  8. Honestly, I can't remember exactly what I did to install the site. I know I found a form on this site that gave me the instructions on what to do. What I do remember is that I used the data.sql file that was in the starter kit files to create the schema on the MS 2005 Sql Server....and I also updated the connection string in the web.config file with the following code.

    <connectionStrings>
    <add name='ClubSiteDB' connectionString='Data Source=tcp:sql2k506.discountasp.net;Integrated Security=false;Initial Catalog=SQL2005_508898_aspnetdb;User ID=SQL2005_508898_aspnetdb_user;Password=******' providerName='System.Data.SqlClient'/>
    <remove name='LocalSqlServer'/>
    <add name='LocalSqlServer' connectionString='Data Source=tcp:sql2k506.discountasp.net;Integrated Security=false;Initial Catalog=SQL2005_508898_aspnetdb;User ID=SQL2005_508898_aspnetdb_user;Password=******' providerName='System.Data.SqlClient' />
    </connectionStrings>
     
  9. If you only ran the Data.sql file you also need to run the Schema.sql file.
    Open them in any text editor and you can see what they do.

    If you haven't created a backup of your DASP database do it before doing this.

    I am scheduled for Memorial services this weekend, U.S. Military Officers.
    Other than that I'll be around to help if you need it.
    Salute,
    Mark
     
  10. I did run the scheme file when setting this up on the server. The more I look at the code, the more I think that the problem may be that problem is that I don't know where the 'ClubName') is located. Can you tell me where to look to update this


    Default.Master
    Dim ClubName As String = ConfigurationManager.AppSettings('ClubName')
    Dim ClubSlogan As String = ConfigurationManager.AppSettings('ClubSlogan')
    Dim ClubAddress As String = ConfigurationManager.AppSettings('ClubAddress')
    Dim ClubCopyright As String = ConfigurationManager.AppSettings('ClubCopyright')

    If Not (ClubName Is Nothing) Or ClubName <> '' Then
    Label_ClubName.Text = ClubName
    masterhead.Title = ClubName

    Post Edited (Ramell L) : 7/12/2008 5:18:07 AM GMT
     
  11. Hi,
    Please consider starting a new thread for your help topics concerning this starter kit.
    This original thread was provided to help everyone with the kit but now it's branching into general code help.

    At any rate, you don't need to be concerned about where the control may be getting that info...
    You can very easily replace that string with anything you want.

    i.e.

     
  12. If I wanted to add a few new links to the header file where would i make this change?
     
  13. Hi,
    How did you create the roles on the remote DASP SQL Server?
    All the best,
    Mark
     
  14. Express? Give a few details about what you are using locally and I can post some suggestions.
    Salute,
    Mark
     
  15. I have created roles in my own local server not in DASP.
     
  16. Hi,
    I got a new error msg, PLEASE HELP ME


    Server Error in '/' Application.
    ________________________________________
    The 'System.Web.Security.SqlRoleProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.
    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.Configuration.Provider.ProviderException: The 'System.Web.Security.SqlRoleProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.

    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:
    [ProviderException: The 'System.Web.Security.SqlRoleProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.]
    System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +589
    System.Web.Security.SqlRoleProvider.CheckSchemaVersion(SqlConnection connection) +65
    System.Web.Security.SqlRoleProvider.GetRolesForUser(String username) +771
    System.Web.Security.RolePrincipal.IsInRole(String role) +272
    System.Web.Security.Roles.IsUserInRole(String username, String roleName) +533
    System.Web.Security.Roles.IsUserInRole(String roleName) +16
    admin1.form1_Load(Object sender, EventArgs e) +66
    System.Web.UI.Control.OnLoad(EventArgs e) +99
    System.Web.UI.Control.LoadRecursive() +47
    System.Web.UI.Control.LoadRecursive() +131
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

    ________________________________________
    Version Information: Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434

    </font> </font>
     
  17. I am having trouble installing the Club Site 2.0 Starter kit (not the original one). Doesn't seem to like the connection string and I can't seem to get SubSonic installed correctly. Any help on these topics?

    Thanks
    Mark
     
  18. Hi rcp,

    Thanks for getting back to me. I am using Visual Web Developer 2008 Express on my Windows XP pro machine. I am trying to get the Club Site 2.0 (from CodePlex) starter kit installed and then transfer it over to my account on Discount ASP.

    I have downloaded the kit, and since there seems to be no installer for it, I just open in (called Express (VB)) from the VWD Express start page. It opens just fine, but when I hit F5 to build and run it i get the error "SQLException was unhandled by user code" and then "An attempt to attach an auto-named database for file D:\Downloads\asp.net\Express_(VB)\Express_(VB)\App_Data\ClubDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

    And once this works (if it does) I think there is some issue with installing Subsonic? (It seems when i hit F5, a bunch of files are created in the "generated" folder under "DAL".

    Thanks in advance,

    Pam
     
  19. Mark,

    What's the exact problem. What's the error message you're getting?

    rcp
    DiscountASP.NET
    www.DiscountASP.NET
     
  20. Hi rcp,

    I downloaded the Clubsite 2.0 version, called Express (VB) and there was no setup.exe in there at all. That is why i had to open it directly with VWD. Are you referring to a different starter kit?

    Thanks
    pam
     
  21. Pam,

    Why are you rebuilding the Club Site? When you downloaded it should come with a setup.exe file. You run that file and it uncompresses the application to your computer. You make the appropriate changes on the web.config file, load the club starter kit db on our database server (you're gonna need to have our SQL addon for this) then run the ASP.Net membership roles provider (http://kb.discountasp.net/article.aspx?id=10413), then upload your application on our server. I don't think you need to rebuild anything for this application to work properly.

    rcp
    DiscountASP.NET
    www.DiscountASP.NET
     
  22. Pam,


    I went to the link you gave and downloaded Express (VB).zip. I uncompressed it to my local folder. I went to VS 2008 Express and click on Open Site and navigated to that folder. I ran the two sql scripts under App_Data folder, and ran the 'aspnet_regsql.exe' to get the ASP.Net membership/roles configured. Once that is done and all web.config settings were properly updated, I used 'Copy Website' in VS 2008 Express to copy my files to the server using FTP. I didn't do a Publish method. The application uploaded to my account without any problems. I still need to go through the site a little and tweak it out. This StarterKit doesn't have a whole lot of data validation. Andas you know SQL Injection attacts are pretty wide spread out there.


    Like I said I didn't do the Build Website method, so I'm not sure if my steps is going to help you out. Oh by the way, on my end, by db was clean, as I had no other tables created on it. So this help me avoid alot of those conflict issues.


    Let me know how things work out on your end.


    rcp
    DiscountASP.NET
    www.DiscountASP.NET
     
  23. Pam,

    Sorry for my misunderstanding. I tried looking for the VB Express version of Clubsite 2.0 and I can't seem to find it on Microsoft. Do you have a link I can use to download it. I'll try installing it on my end and let you know what I find.

    rcp
    DiscountASP.NET
    www.DiscountASP.NET
     
  24. Many thanks rcp for going through the effort.


    THere was a point I wasn't clear on: after your ran the (local i imagine) the sql scripts and set up the website locally, when you Copied the website over, did you have to do anything with the database, or how did you get the tables into the discountasp database?





    Thanks


    Pam
     
  25. Pam,


    Connect to our database server using SQL Server Management Studio, once connected go to File/Open/File and navigate to the .sql files in your VB Express folder. It should be under App_Data. The two files will be Data.sql and Schema.sql. I don't think it matters which one you run first. I ran schema.sql first, and then Data.sql next.


    rcp
    DiscountASP.NET
    www.DiscountASP.NET
     
  26. Thanks rcp,

    I will try that.

    Pam
     

Share This Page