Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/09/10 12:20:14 (14 years ago)
Author:
gschwarz
Message:

#1198 Authentication implemented with GetDateTimeString only for User: Gerhard

Location:
branches/WebApplication/WebSites/HeuristicLabWeb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/WebApplication/WebSites/HeuristicLabWeb/LoginForm.aspx.cs

    r4476 r4585  
    99public partial class LoginForm : System.Web.UI.Page
    1010{
     11   
    1112    protected void Page_Load(object sender, EventArgs e)
    1213    {
     
    1415    protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
    1516    {
    16         FormsAuthentication.RedirectFromLoginPage(Login1.UserName, false);
     17        if( Membership.ValidateUser(Login1.UserName, Login1.Password ) )
     18            FormsAuthentication.RedirectFromLoginPage(Login1.UserName, false);
    1719    }
    1820}
  • branches/WebApplication/WebSites/HeuristicLabWeb/Web.config

    r4574 r4585  
    3333    </location>
    3434  <appSettings/>
    35   <connectionStrings/>
     35 
     36<!--Implemented-->
     37  <connectionStrings>
     38    <add name="HeuristicLab.Authentication"
     39         connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=HeuristicLab.Authentication"/>
     40  </connectionStrings>
     41<!--ImplementedEND-->
     42 
    3643  <compositeWeb>
    3744    <modules>
     
    8996  </exceptionHandling>
    9097  <system.web>
     98
    9199    <!--
    92100            Set compilation debug="true" to insert debugging
     
    108116            <forms name="LoginForm" loginUrl="LoginForm.aspx"></forms>
    109117        </authentication>
     118
     119<!--Implemented-->
     120        <membership defaultProvider="AspNetSqlMembershipProvider">
     121            <providers>
     122              <clear/>
     123              <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="HeuristicLab.Authentication"
     124                   enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
     125                   maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
     126                   applicationName="HeuristicLab.Authentication" />
     127            </providers>
     128          </membership>
     129
     130          <roleManager enabled="true">
     131            <providers>
     132              <clear/>
     133              <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="HeuristicLab.Authentication" applicationName="HeuristicLab.Authentication" />
     134            </providers>
     135          </roleManager>
     136
     137<!--ImplementedEND--> 
     138   
     139   
     140   
    110141    <!--
    111142            The <customErrors> section enables configuration
     
    174205    </handlers>
    175206  </system.webServer>
     207 
     208 
     209  <system.serviceModel>
     210    <bindings>
     211      <wsHttpBinding>
     212        <binding name="DefaultWSHttpBinding">
     213          <security mode="Message">
     214            <message clientCredentialType="UserName" />
     215          </security>
     216        </binding>
     217      </wsHttpBinding>
     218     
     219      <mexHttpBinding>
     220        <binding name="DefaultMexBinding" />
     221      </mexHttpBinding>
     222    </bindings>
     223   
     224    <services>
     225      <service behaviorConfiguration="DefaultBehavior" name="HeuristicLab.Services.DemoService.Service">
     226        <clear />
     227        <endpoint binding="wsHttpBinding" bindingConfiguration="DefaultWSHttpBinding"
     228          contract="HeuristicLab.Services.DemoService.IService" listenUriMode="Explicit">
     229        </endpoint>
     230       
     231        <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="DefaultMexBinding"
     232          contract="IMetadataExchange" listenUriMode="Explicit">
     233        </endpoint>
     234      </service>
     235    </services>
     236   
     237    <behaviors>
     238      <serviceBehaviors>
     239        <behavior name="DefaultBehavior">
     240          <serviceMetadata httpGetEnabled="true" />
     241          <serviceDebug includeExceptionDetailInFaults="true" />
     242          <serviceAuthorization principalPermissionMode="UseAspNetRoles"
     243            roleProviderName="AspNetSqlRoleProvider" />
     244          <serviceCredentials>
     245            <serviceCertificate findValue="localhost" x509FindType="FindBySubjectName" />
     246            <userNameAuthentication userNamePasswordValidationMode="MembershipProvider"
     247              membershipProviderName="AspNetSqlMembershipProvider" />
     248          </serviceCredentials>
     249        </behavior>
     250      </serviceBehaviors>
     251    </behaviors>
     252    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
     253  </system.serviceModel>
     254
     255  <system.webServer>
     256    <modules runAllManagedModulesForAllRequests="true"/>
     257  </system.webServer>
    176258</configuration>
Note: See TracChangeset for help on using the changeset viewer.