Click here to Skip to main content
15,867,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
how to create asp net membership provider in mvc 4 using entity framework and sql server authentication
Posted
Comments
Ankur\m/ 13-Aug-13 8:17am    
What have you tried? Did you even search Google for a start?
This is Quick Answer and we can only help with specific problems here.
prthghosh999 13-Aug-13 9:38am    
my database name is MeetingRoomsManager entity name is MeetingRoomsManagerEntities. i have written given code in my web config file...
<configuration>
<connectionstrings>
<add name="MeetingRoomsManagerEntities" connectionstring="metadata=res://*/MeetingRoomsManager.csdl|res://*/MeetingRoomsManager.ssdl|res://*/MeetingRoomsManager.msl;provider=System.Data.SqlClient;provider connection string='Data Source=KSOFT1;Initial Catalog=MeetingRoomsManager;User ID=mssqlmain;Password=ksoftware;Integrated Security=true;MultipleActiveResultSets=True'" providername="System.Data.EntityClient">

...


<membership defaultprovider="AspNetSqlMembershipProvider">
<providers>
<clear>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionstringname="MeetingRoomsManagerEntities"
="" enablepasswordretrieval="false" enablepasswordreset="true" requiresquestionandanswer="false" requiresuniqueemail="false" maxinvalidpasswordattempts="5" minrequiredpasswordlength="6" minrequirednonalphanumericcharacters="0" passwordattemptwindow="10" applicationname="/">
</providers>


<profile>
<providers>
<clear>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionstringname="MeetingRoomsManagerEntities" applicationname="/">
</providers>
</profile>

<rolemanager enabled="true" defaultprovider="AspNetSqlRoleProvider">
<providers>
<clear>
<add connectionstringname="MeetingRoomsManagerEntities" applicationname="/"
="" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider">
<add applicationname="/" name="AspNetWindowsTokenRoleProvider"
="" type="System.Web.Security.WindowsTokenRoleProvider">
</providers>


....
....


but when i click on submit button to register some one
i got this error "An error occurred while attempting to initialize a System.Data.SqlClient.SqlConnection object. The value that was provided for the connection string may be wrong, or it may contain an invalid syntax.
Parameter name: connectionString"
David_Wimbley 13-Aug-13 13:25pm    
#1 you should use improve question link above. #2 you should post some code/config file of where the issue is occuring. We don't have access to your hard drive so code/config file would be very helpful. All we've got so far is what looks like a redacted config file or some hastily thrown together xml.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900