Uploading classified starter kit.
Re-invent ASP.NET Hosting Community
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Uploading classified starter kit. Expand / Collapse
Author
Message
Posted 7/4/2006 3:31:00 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 7/28/2006 7:56:00 PM
Posts: 3, Visits: 1
I have modified the classified starter kit but I am not sure what steps to take to upload it. Specifically with the SQL 2005 databases (classifiedsdb and aspnetdb).

Thank you,
Jesse
Post #318
Posted 7/7/2006 6:01:00 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: 12/30/2008 9:51:24 AM
Posts: 170, Visits: 469

Hello,

Our support team should be able to assist you with this.  We do have a free service where we can attach your SQL 2005 Express database to your empty SQL 2005 database with us..  You also would need to modify your web.config connection string to point to your new SQL 2005 database and can provide you with a sample based on your account if needed.



Paul B

Re-invent Technologies LLC
http://www.re-invent.com

Innovative ASP.NET 3.5/2.0 Hosting
Now with Windows 2008 Hosting and SQL 2008
Celebrating 10 Years in Business!

Post #319
Posted 7/8/2006 9:44:00 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 7/8/2006 9:44:00 AM
Posts: 2, Visits: 1
Likewise, I'm interested in modifying the Community Starter Kit but also unclear on how to upload it to a site. Do I FTP the two MDF files and have the ISP attach them to SQL Server? Or do I run the SQL scripts to crreate the dbs and populate them w/ data?

Thx in advance for helping a newbie.

-Pete
Post #322
Posted 7/8/2006 11:59:00 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 7/28/2006 7:56:00 PM
Posts: 3, Visits: 1

Ok here's what you do.

start...run...cmd.exe
c:
cd \winnt\Microsoft.Net\Framework\v2.0.50727
Type the following three commands in the command line, be sure your database is empty. Also if you are not running win2k, the previous command is cd \windows\Microsoft.Net\Framework\v2.0.50727

aspnet_regsql.exe -S sql2005.reinventinc.com -U <db_user> -P <DB_password> -A all -d <DB_Name>

osql -S sql2005.reinventinc.com -U <db_user> -P <DB_password> -d <DB_Name> -i <path to the starterKit>\App_datat\classifieds-add.sql

osql -S sql2005.reinventinc.com -U <db_user> -P <DB_password> -d <DB_Name> -i <path to the starterKit>\App_datat\classifieds-categories.sql

<DB_Name> is your domain name without .com
<db_user> your user name that you got on your welcome email
<DB_password> is the password that you got on your welcome email
<path to the starterKit> is the full path of where your application is at Ex. "c:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\WebSites\Classifieds1\"

Modify your web.config file in your project, delete from <connectionStrings> down, and paste this in...


<
connectionStrings>

<add name="classifiedsConnection" connectionString="Data Source=sql2005.reinventinc.com;Initial Catalog=<db_name>;Persist Security Info=True;User ID=<db_user>;Password=<db_password> providerName="System.Data.SqlClient"/>

<remove name="LocalSqlServer"/>

<add name="LocalSqlServer" connectionString="Data Source=sql2005.reinventinc.com;Initial Catalog=<db_name>;Persist Security Info=True;User ID=<db_user>;Password=<db_password> providerName="System.Data.SqlClient"/>

</connectionStrings>

<system.net>

<mailSettings>

<smtp>

<network host="mail.<your domain name>" port="25" defaultCredentials="true" userName=<db_name> password=<db_password>/>

</smtp>

</mailSettings>

</system.net>

</configuration>


Again...
<DB_Name> is your domain name without .com
<db_user> your user name that you got on your welcome email
<DB_password> is the password that you got on your welcome email
<your domain name> is your domain name Ex. something.com

OK, now from Visual Studio, publish your website to a temporary directory... Ex. c:\temp\classifieds

Then FTP the entire contents with CoffeeCup Free FTP or another ftp program to ftp.<your domain name>/<your domain name>/

Load up your website in Internet Explorer and register a user...now how do you make it an admin...
Insert a New Item...web form in Visual Studio, name it Default2.aspx and check the box "Place code in separate file"
Open up Default2.aspx for edit...and paste the following

<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="SecondBar" Runat="Server">

<div>

<aspanel ID="Panel1" runat="server" Height="288px" Width="456px">

</aspanel>

</div>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="Main" Runat="Server">

</asp:Content>

Open up Default2.aspx.vb and paste the following...

Partial Class Default2

Inherits System.Web.UI.Page

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

For Each roleName As String In Roles.GetAllRoles

Response.Write("Role group:" + roleName + "<br>")

For Each userName As String In Roles.GetUsersInRole(roleName)

Response.Write(userName + "<br>")

Dim btn As New Button

btn.Text = "Move " + userName + " from " + roleName + " to Administrators"

btn.ID = userName

AddHandler btn.Click, AddressOf Me.ButtonClickHandler

Panel1.Controls.Add(btn)

Next

Next

End Sub

Private Sub ButtonClickHandler(ByVal sender As Object, ByVal e As System.EventArgs)

Dim userName As String = sender.id

Roles.RemoveUserFromRole(userName, "Guests")

Roles.AddUserToRole(userName, "Administrators")

End Sub

End Class

CTRL-F5 to run, and follow the instructions on the page...

You are all set up, but make sure in Visual studio you right click Default2.aspx and hit "Exclude from project" so that page does not get published later on, although you can still use it later to make someone else an admin...

 

Hope this helped, took me 2 days to figure this out...

-Jesse Hernandez 

Post #324
Posted 7/8/2006 12:08:00 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 7/28/2006 7:56:00 PM
Posts: 3, Visits: 1

in the previous post, there are two smiley faces in the code to paste so I am typing it here separated by spaces

< a s p : p a n e l>

in the previous post it was <asp:panel>

Also, make sure you delete BOTH MDF files (aspnetdb and classifiedsdb) before you publish or you'll end up FTPing more than 10megabytes of waste.

Post #325
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Administrator, Re-invent (Paul), Re-invent (Nick)

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 8:13am

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.063. 13 queries. Compression Disabled.


Copyright 2007 Re-invent Technologies LLC All Rights Reserved.