HELP, I cannot login to the Starter Kit once I installed?

ASP.NET Starter Kit is installed using ASP.NET roles and personalization technology and therefore you need to create the user once you have installed the portal on our server.

Note, that you cannot transfer all your roles or users from your existing database into our server.
It will not work as ASP.NET personalization differentiate users based on the application Id, and the applicationID is auto generated and unique.

Therefore, the only way  is you need to create ASPX pages that can help you to create all the users and roles.

Below is some of the sample script that you can use to create user.
Please copy and paste it into a file called CreateLogin.aspx
Once you do that, upload the file into your Starter Kit public_html folder
And browse the file.
Once you have create all the user, please delete this file from the server.

<%@ PAGE LANGUAGE="C#" %>

<%@ IMPORT NAMESPACE="System.Web.Security" %>

<HEAD RUNAT="server">

HEAD>

<SCRIPT RUNAT="server">

protected void Page_Load(object sender, EventArgs e)

{

string []arrRoles = Roles.GetAllRoles();

for(int i=0;i

chkRoles.Items.Add(arrRoles[i]);

}

}

public void CreateUser_OnClick(object sender, EventArgs args)

{

// Create new user and retrieve create status result.

MembershipCreateStatus status;

string passwordQuestion = "";

string passwordAnswer = "";

if (Membership.RequiresQuestionAndAnswer)

{

passwordQuestion = PasswordQuestionTextbox.Text;

passwordAnswer = PasswordAnswerTextbox.Text;

}

try

{

MembershipUser newUser = Membership.CreateUser(UsernameTextbox.Text, PasswordTextbox.Text,

EmailTextbox.Text, passwordQuestion,

passwordAnswer, true, out status);

if (newUser == null)

{

Msg.Text = GetErrorMessage(status);

}

else

{

Msg.Text = "User Created";

}

}

catch

{

Msg.Text = "An exception occurred creating the user.";

}

}

public string GetErrorMessage(MembershipCreateStatus status)

{

switch (status)

{

case MembershipCreateStatus.DuplicateUserName:

return "Username already exists. Please enter a different user name.";

case MembershipCreateStatus.DuplicateEmail:

return "A username for that e-mail address already exists. Please enter a different e-mail address.";

case MembershipCreateStatus.InvalidPassword:

return "The password provided is invalid. Please enter a valid password value.";

case MembershipCreateStatus.InvalidEmail:

return "The e-mail address provided is invalid. Please check the value and try again.";

case MembershipCreateStatus.InvalidAnswer:

return "The password retrieval answer provided is invalid. Please check the value and try again.";

case MembershipCreateStatus.InvalidQuestion:

return "The password retrieval question provided is invalid. Please check the value and try again.";

case MembershipCreateStatus.InvalidUserName:

return "The user name provided is invalid. Please check the value and try again.";

case MembershipCreateStatus.ProviderError:

return "The authentication provider returned an error. Please verify your entry and try again. If the problem persists, please contact your system administrator.";

case MembershipCreateStatus.UserRejected:

return "The user creation request has been canceled. Please verify your entry and try again. If the problem persists, please contact your system administrator.";

default:

return "An unknown error occurred. Please verify your entry and try again. If the problem persists, please contact your system administrator.";

}

}

SCRIPT>

<HTML>

<HEAD>

<TITLE>Create UserTITLE>

HEAD>

<BODY>

<FORM ID="Form1" RUNAT="server">

<H3>

Create New UserH3>

<ASP:LABEL ID="Msg" FORECOLOR="maroon" RUNAT="server" /><BR>

<TABLE CELLPADDING="3" BORDER="0">

<TR>

<TD>

Username:TD>

<TD>

<ASP:TEXTBOX ID="UsernameTextbox" RUNAT="server" />TD>

<TD>

<ASP:REQUIREDFIELDVALIDATOR ID="UsernameRequiredValidator" RUNAT="server" CONTROLTOVALIDATE="UserNameTextbox"

FORECOLOR="red" DISPLAY="Static" ERRORMESSAGE="Required" />TD>

TR>

<TR>

<TD>

Password:TD>

<TD>

<ASP:TEXTBOX ID="PasswordTextbox" RUNAT="server" TEXTMODE="Password" />TD>

<TD>

<ASP:REQUIREDFIELDVALIDATOR ID="PasswordRequiredValidator" RUNAT="server" CONTROLTOVALIDATE="PasswordTextbox"

FORECOLOR="red" DISPLAY="Static" ERRORMESSAGE="Required" />TD>

TR>

<TR>

<TD>

Confirm Password:TD>

<TD>

<ASP:TEXTBOX ID="PasswordConfirmTextbox" RUNAT="server" TEXTMODE="Password" />TD>

<TD>

<ASP:REQUIREDFIELDVALIDATOR ID="PasswordConfirmRequiredValidator" RUNAT="server"

CONTROLTOVALIDATE="PasswordConfirmTextbox" FORECOLOR="red" DISPLAY="Static" ERRORMESSAGE="Required" />

<ASP:COMPAREVALIDATOR ID="PasswordConfirmCompareValidator" RUNAT="server" CONTROLTOVALIDATE="PasswordConfirmTextbox"

FORECOLOR="red" DISPLAY="Static" CONTROLTOCOMPARE="PasswordTextBox" ERRORMESSAGE="Confirm password must match password." />

TD>

TR>

<TR>

<TD>

Email Address:TD>

<TD>

<ASP:TEXTBOX ID="EmailTextbox" RUNAT="server" />TD>

<TD>

<ASP:REQUIREDFIELDVALIDATOR ID="EmailRequiredValidator" RUNAT="server" CONTROLTOVALIDATE="EmailTextbox"

FORECOLOR="red" DISPLAY="Static" ERRORMESSAGE="Required" />TD>

TR>

<% if (Membership.RequiresQuestionAndAnswer)

{ %>

<TR>

<TD>

Password Question:TD>

<TD>

<ASP:TEXTBOX ID="PasswordQuestionTextbox" RUNAT="server" />TD>

<TD>

<ASP:REQUIREDFIELDVALIDATOR ID="PasswordQuestionRequiredValidator" RUNAT="server"

CONTROLTOVALIDATE="PasswordQuestionTextbox" FORECOLOR="red" DISPLAY="Static"

ERRORMESSAGE="Required" />TD>

TR>

<TR>

<TD>

Password Answer:TD>

<TD>

<ASP:TEXTBOX ID="PasswordAnswerTextbox" RUNAT="server" />TD>

<TD>

<ASP:REQUIREDFIELDVALIDATOR ID="PasswordAnswerRequiredValidator" RUNAT="server" CONTROLTOVALIDATE="PasswordAnswerTextbox"

FORECOLOR="red" DISPLAY="Static" ERRORMESSAGE="Required" />TD>

TR>

<% } %>

<% if (Roles.GetAllRoles().Length > 0)

{%>

<TR>

<TD>

Roles :

TD>

TR>

<TR>

<TD>

<ASP:CHECKBOXLIST ID="chkRoles" RUNAT="server">

ASP:CHECKBOXLIST>

TD>

TR>

<% } %>

<TR>

<TD>

TD>

<TD>

<ASP:BUTTON ID="CreateUserButton" TEXT="Create User" ONCLICK="CreateUser_OnClick"

RUNAT="server" />TD>

TR>

TABLE>

FORM>

BODY>

HTML>

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I install Issue Tracker ASP.net Starter Kit on your server?

Issue Tracker ASP.NET Starter Kit has been officially released by the Microsoft ASP.net...