Guest User

Untitled

a guest
May 15th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. <?xml version="1.0"?>
  2.  
  3. <configuration>
  4.  
  5. <appSettings/>
  6.  
  7. <connectionStrings>
  8. <remove name="LocalSqlServer"/>
  9. <add name="ConnString1" connectionString="Data Source=.SQLEXPRESS;Initial Catalog=IceWebPortal_SQL2K5;user=sa;password=;integrated security=true;" providerName="System.Data.SqlClient"/>
  10. <add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=aspnet_membership_test;Integrated Security=True" providerName="System.Data.SqlClient"/>
  11. </connectionStrings>
  12.  
  13. <system.web>
  14. <!--
  15. Set compilation debug="true" to insert debugging
  16. symbols into the compiled page. Because this
  17. affects performance, set this value to true only
  18. during development.
  19. -->
  20. <compilation debug="true" />
  21. <!--
  22. The <authentication> section enables configuration
  23. of the security authentication mode used by
  24. ASP.NET to identify an incoming user.
  25. -->
  26. <authentication mode="Forms">
  27. <forms
  28. name="CookieDemo"
  29. loginUrl="Default.aspx"
  30. protection="All"
  31. timeout="30"
  32. path="/"
  33. />
  34. </authentication>
  35. <!--<authorization>
  36. <deny users="?"/>
  37. </authorization>-->
  38. </system.web>
  39.  
  40. <location path="Default.aspx">
  41. <system.web>
  42. <authorization>
  43. <allow users="*"></allow>
  44. </authorization>
  45. </system.web>
  46. </location>
  47. </configuration>
  48.  
  49. string username = this.usernameTextBox.Text;
  50. string password = this.passwordTextBox.Text;
  51.  
  52. bool success = FormsAuthentication.Authenticate(username, password);
  53.  
  54. if (success)
  55. {
  56. }
  57.  
  58. <membership>
  59. <providers>
  60. <clear />
  61. <add name="AspNetSqlMembershipProvider"
  62. type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
  63. connectionStringName="ApplicationServices"
  64. enablePasswordRetrieval="false"
  65. enablePasswordReset="true"
  66. requiresQuestionAndAnswer="false"
  67. requiresUniqueEmail="false"
  68. passwordFormat="Hashed"
  69. maxInvalidPasswordAttempts="5"
  70. minRequiredPasswordLength="6"
  71. minRequiredNonalphanumericCharacters="0"
  72. passwordAttemptWindow="10"
  73. passwordStrengthRegularExpression=""
  74. applicationName="/" />
  75. </providers>
  76. </membership>
Add Comment
Please, Sign In to add comment