1 Replies - 614 Views - Last Post: 31 October 2016 - 06:19 AM Rate Topic: -----

#1 birddseedd   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 30-October 16

Login controls storing user data in sql and roles in local file?

Posted 30 October 2016 - 11:06 PM

I set up my site to store user data on a sql server but when creating roles it creates and uses a local database file.

I use the drag and drop wizard control to create users. But to create roles I either used the web configuration site or the line Roles.CreateRole("name");

Why is it using one datastore for users and another for roles?


thanks

This is my web config file

 <?xml version="1.0"?> 

 <configuration> 

     <system.web> 
       <authentication mode ="Forms"> 
         <forms loginUrl="Default.aspx" name=".ASPXFORMSAUTH"></forms> 
       </authentication>        
                 
       <membership> 
         <providers> 
           <clear /> 
           <add name="AspNetSqlMembershipProvider" 
             type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
             connectionStringName="conString" 
             enablePasswordRetrieval="false" 
             enablePasswordReset="true" 
             requiresQuestionAndAnswer="true" 
             applicationName="/" 
             requiresUniqueEmail="true" 
             passwordFormat="Hashed" 
             maxInvalidPasswordAttempts="5" 
             minRequiredPasswordLength="7" 
             minRequiredNonalphanumericCharacters="0" 
             passwordAttemptWindow="10" 
             passwordStrengthRegularExpression=""/> 
             </providers> 
       </membership> 
       
       <authorization> 
        
       </authorization> 
       <roleManager enabled="true" /> 
       <compilation debug="false" targetFramework="4.0" /> 
       <customErrors mode="Off"/> 
     </system.web> 
     <connectionStrings> 
       <add name ="conString" 
              connectionString ="Data source=DELLXPS\SQLEXPRESS; Initial Catalog=SEIN; Integrated Security=true;" 
              providerName =" System.Data.Sqlclient"/> 
     </connectionStrings> 

 </configuration>  


Is This A Good Question/Topic? 0
  • +

Replies To: Login controls storing user data in sql and roles in local file?

#2 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 7915
  • View blog
  • Posts: 26,425
  • Joined: 05-May 12

Re: Login controls storing user data in sql and roles in local file?

Posted 31 October 2016 - 06:19 AM

Moving to ASP.NET.

I was under the impression that providers needed to be specified under the <roleManager> element, but you'll need to dig through MSDN to confirm.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1