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>
<asp
anel ID="Panel1" runat="server" Height="288px" Width="456px">
</asp
anel>
</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