<script runat="server"> void Application_Start(object sender, EventArgs e) { try { if (Roles.RoleExists("Administrators") == false) Roles.CreateRole("Administrators"); if (Membership.FindUsersByName("ken").Count == 0) { Membership.CreateUser("ken", "123", "ken@jobpost.com"); Roles.AddUserToRole("ken", "Administrators"); } if (Membership.FindUsersByName("dan").Count == 0) Membership.CreateUser("dan", "123", "dan@jobpost.com"); } catch (Exception ex) { Response.Write(ex.ToString()); } } </script>
Exception Details: System.Web.HttpException: Response is not available in this context. Source Error: Line 26: catch (Exception ex) Line 27: { Line 28: Response.Write(ex.ToString()); Line 29: }
System.Web.HttpContext.Current.Request
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)