Error occured during loading the page now. Here is the error:
Page location: /Register.aspx
Message: D:\hshome\www.company.com\Register.aspx.cs(130): error
CS0122: 'System.Configuration.Debug' is inaccessible due to its
protection level
Source: System.Web
Method: System.CodeDom.Compiler.CompilerResults Compile()
Stack Trace:
at System.Web.Compilation.AssemblyBuilder.Compile()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath
virtualPath)
at
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
allowBuildInPrecompile)
at
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild,
Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp,
Boolean noAssert)
at
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context,
Boolean allowCrossApp, Boolean noAssert)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext
context, String requestType, VirtualPath virtualPath, String physicalPath)
at
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath
virtualPath, String physicalPath)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context,
String requestType, VirtualPath path, String pathTranslated, Boolean
useAppConfig)
at
System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)
HERE IS my code:
protected
void Page_Load(object sender, EventArgs e)
{
}
protected
void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
try
{
string userStr = null;
string passStr = null;
string emailStr = null;
string quesStr = null;
string ansStr = null;
string fnameStr = null;
string lnameStr = null;
string compStr = null;
string addStr = null;
string add2Str = null;
string cityStr = null;
string stateStr = null;
string zipStr = null;
string cntyStr = null;
string phoneStr = null;
TextBox user = (TextBox)LoginView1.FindControl("UserName");
if(user != null)
{
userStr = user.Text;
}
TextBox pass =(TextBox)LoginView1.FindControl("Password");
if (pass != null)
{
passStr = pass.Text;
}
TextBox email = (TextBox)LoginView1.FindControl("Email");
if(email != null)
{
emailStr = email.Text;
}
TextBox ques = (TextBox)LoginView1.FindControl("Question");
if (ques != null)
{
quesStr = ques.Text;
}
TextBox ans = (TextBox)LoginView1.FindControl("Answer");
if (ans != null)
{
ansStr = ans.Text;
}
TextBox fname = (TextBox)LoginView1.FindControl("FName");
if (fname != null)
{
fnameStr = fname.Text;
}
TextBox lname = (TextBox)LoginView1.FindControl("LName");
if (lname != null)
{
lnameStr = lname.Text;
}
TextBox comp = (TextBox)LoginView1.FindControl("Company");
if (comp != null)
{
compStr = comp.Text;
}
TextBox add = (TextBox)LoginView1.FindControl("Address");
if (add != null)
{
addStr = add.Text;
}
TextBox add2 = (TextBox)LoginView1.FindControl("Address2");
if (add2 != null)
{
add2Str = add2.Text;
}
TextBox city = (TextBox)LoginView1.FindControl("City");
if (city != null)
{
cityStr = city.Text;
}
TextBox state = (TextBox)LoginView1.FindControl("State");
if (state != null)
{
stateStr = state.Text;
}
TextBox zip = (TextBox)LoginView1.FindControl("Zipcode");
if (zip != null)
{
zipStr = zip.Text;
}
TextBox cnty = (TextBox)LoginView1.FindControl("Country");
if (cnty != null)
{
cntyStr = cnty.Text;
}
TextBox phone = (TextBox)LoginView1.FindControl("Phone");
if (phone != null)
{
phoneStr = phone.Text;
}
long acctno = CatalogAccess.InsertAccount(userStr, passStr, emailStr, quesStr, ansStr, fnameStr, lnameStr, compStr, addStr, add2Str, cityStr, stateStr, zipStr, cntyStr, phoneStr, Request.ServerVariables["REMOTE_ADDR"]);
Roles.AddUserToRole((sender as CreateUserWizard).UserName,
"Customers");
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
}