Questions tagged [sqlmembershipprovider]

The `SqlMembershipProvider` class is used by the `Membership` and `MembershipUser` classes to provide membership services for an ASP.NET application using a SQL Server database.

The SqlMembershipProvider class is used by the Membership and MembershipUser classes to provide membership services for an ASP.NET application using a SQL Server database.

System.Object
. System.Configuration.Provider.ProviderBase
. . System.Web.Security.MembershipProvider
. . . System.Web.Security.SqlMembershipProvider

Namespace: System.Web.Security
Assembly: System.Web (in System.Web.dll)

To manually create the database, run the Aspnet_regsql.exe executable found in the %systemroot%\Microsoft.NET\Framework\ versionNumber folder and specify the -A m option (for example aspnet_regsql.exe -A m). The database created is called Aspnetdb. Alternatively, run Aspnet_regsql.exe to pull up the GUI configuration mode and choose to configure all ASP.NET Features.

http://msdn.microsoft.com/en-us/library/system.web.security.sqlmembershipprovider(v=vs.110).aspx

201 questions
40
votes
6 answers

When the same user ID is trying to log in on multiple devices, how do I kill the session on the other device?

What I want to do is to limit a user ID to only being able to log in to one device at a time. For example, user ID "abc" logs in to their computer. User ID "abc" now tries to log in from their phone. What I want to happen is to kill the session…
38
votes
5 answers

Entity Framework: how to solve "FOREIGN KEY constraint may cause cycles or multiple cascade paths"?

there are lots of questions about this problem, but I couldn't solve my case. can some one please take a look at this: I have an Office table which has one-many relationship with Doctor and Secretary tables. Both of the last tables, are derived from…
Blazi
  • 991
  • 3
  • 9
  • 19
32
votes
7 answers

Is it possible to change the username with the Membership API

I am using the default sql membership provider with ASP.NET and I would like to provide a page to change the user's username. I believe I am sure I could do this with a custom provider, but can this be done with the default provider? Second part of…
28
votes
1 answer

Disabling account lockout with the SqlMembershipProvider

How do I disable the account lockout feature of the SqlMembershipProvider? The MSDN documentation for the MaxInvalidPasswordAttempts property does not specify how to disable it. If I can't find the correct way to do it I will set the…
19
votes
3 answers

Making user login persistant with ASP .Net Membership

I have a website that is built in ASP.NET 3.5 & SQL Server 2005, using the sql membership provider, and presumably forms authentication. Since security needs on my site are very low, I would like to authenticate once, and then keep the log in…
13
votes
1 answer

ASP.NET Membership Password Reset

This is crazy, I have been trying for hours to get this to work. My client wants to be able to reset password for users who have forgotten them The only parameter he has is the UserName. He does NOT want the user to be able to reset the password…
11
votes
1 answer

How to set password rules for ASP.NET identity?

In my ASP.NET applications I have following settings in DefaultMembershipProvider and SqlMembershipProvider in web.config: enablePasswordRetrieval="true" passwordFormat="Clear" requiresQuestionAndAnswer="false" They are required for Digest…
9
votes
7 answers

Do most people use .NET's SqlMembershipProvider, SqlRoleProvider, and SqlProfileProvider?

Do most people use .NET's SqlMembershipProvider, SqlRoleProvider, and SqlProfileProvider when developing a site with membership capabilities? Or do many people make their own providers, or even their own membership systems entirely? What are the…
John B
  • 20,062
  • 35
  • 120
  • 170
8
votes
2 answers

How to combine using Membership API with own application related data?

Designing a new application in asp.net 4 I have to make a decision how to use a MS SQL Membership API along with my own data in the MS SQL data base. Firstly I need to store and access user profile data in more flexible manner then the Profile…
8
votes
5 answers

Unable to initialize provider. Missing or incorrect schema. for MySql.Web connector

I am trying to use MySql Connector 6.2.2.0 for membership and role providers. The issue I'm having is: Unable to initialize provider. Missing or incorrect schema.
8
votes
4 answers

Where do I store additional user details using ASP.NET MVC and the SqlMembershipProvider?

So, I'm creating an ASP.NET MVC website. It has a fairly complex user sign-up page with a lot of fields. My question is, where should I persist this? The user tables created by the membership-provider tool don't contain these columns and I'm left…
KingNestor
  • 65,976
  • 51
  • 121
  • 152
7
votes
1 answer

Inject a MembershipProvider into ASP.NET MVC AccountController

ASP.NET MVC 1.0 project templates include an AccountController class, which supports constructor injection: public AccountController(IFormsAuthentication formsAuth, IMembershipService service) { FormsAuth = formsAuth ?? new…
7
votes
2 answers

Migrating ASP.NET SQL Membership to ASP.NET Identity with Database First

I have an old ASP.NET application that uses SQL Membership and uses aspnet_ tables to manage the logins, passwords, and roles, etc. I'm wanting to rewrite the application using MVC 5 but it uses ASP.NET Identity and I haven't found an easy way to…
7
votes
1 answer

MVC4 SimpleMemberhip 'The Provider encountered an unknown error.'

I'm trying to use SimpleMembership with MVC4 using an SQL Azure database. I get an exception The Provider encountered an unknown error. With no inner exception, on this line of code: WebSecurity.CreateAccount("test@test.com", "23iu$9835",…
7
votes
3 answers

Changing membership connection string

Iam new to asp.net membership & I need help to change its connection string programmatically. What I have tried till now is I have create a class project name Sample as namespace** and extends the System.Web.Security.SqlMembershipProvider code…
GowthamanSS
  • 1,434
  • 4
  • 33
  • 58
1
2 3
13 14