Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <asp:Login ID="Login1" runat="server"
- MembershipProvider="MySqlMembershipProvider">
- <LayoutTemplate>
- <!-- template code snipped for brevity -->
- </LayoutTemplate>
- </asp:Login>
- <asp:CreateUserWizard ID="CreateUserWizard1" runat="server"
- MembershipProvider="MySqlMembershipProvider">
- <WizardSteps>
- <asp:CreateUserWizardStep runat="server" />
- <asp:CompleteWizardStep runat="server" />
- </WizardSteps>
- </asp:CreateUserWizard>
- protected void LoginCtl_Authenticate(object sender, AuthenticateEventArgs e)
- {
- // Check the Credentials against DB
- bool authed = DAL.Authenticate(user, pass);
- e.Authenticated = authed;
- }
- <!--Deny all users -->
- <authorization>
- <deny users="*" />
- </authorization>
- <!--Deny all users unless autherticated -->
- <authorization>
- <deny users="?" />
- </authorization>
- <configuration>
- <system.web>
- <authorization>
- <allow roles="Admins"/>
- <deny users="*"/>
- </authorization>
- </system.web>
- </configuration>
- <authentication mode="Forms">
- <forms name="SqlAuthCookie" timeout="10" loginUrl="Login.aspx"/>
- </authentication>
- <authorization>
- <deny users="?"/>
- <allow users="*"/>
- </authorization>
- <membership defaultProvider="MySqlMembershipProvider">
- <providers>
- <clear/>
- <add name="MySqlMembershipProvider" connectionStringName="MyLocalSQLServer" applicationName="MyAppName" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
- </providers>
- </membership>
- <connectionStrings>
- <add name="MyLocalSQLServer" connectionString="Initial Catalog=aspnetdb;data source=iballanbsqlexpress;uid=full;pwd=full;"/>
- </connectionStrings>
Add Comment
Please, Sign In to add comment