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
6
votes
2 answers

SqlMembershipProvider Membership.GetUser by name failing

The problem Membership.GetUser works fine if I use the GUID, but fails if I try it without parameters or with the name: //This works and adds records to aspnet_user & aspnet_Membership tables MembershipUser membershipUser =…
maulkye
  • 427
  • 5
  • 13
5
votes
1 answer

SqlMembership on both Azure and Standalone SQL Server

I'm working on an ASP.NET Web Forms application with SqlMembershipProvider. As it is running on Azure too, I use KB2006191 Updated ASP.NET scripts for use with SQL Azure for tables and SPs. Apparently, they do not work smoothly with a standalone SQL…
5
votes
2 answers

Concurrency issues with multiple, independent database transactions?

How would you solve the concurrency issue with the following code? In this example, we'd like to know why the user failed authentication. The problem is that this code makes two separate calls to the database, but we'd like the whole method to…
Brandon
  • 1,412
  • 11
  • 15
5
votes
1 answer

Where did aspnetdb.mdf come from in my ASP.NET MVC Application?

I'm new to ASP.NET and have just starting to learn ASP.NET MVC 3. I've started a new ASP.NET MVC 3 project using the default template, which already has most of the membership stuff already configured. Now I'm trying to understand what is really…
Eric Anastas
  • 21,675
  • 38
  • 142
  • 236
5
votes
1 answer

Trying to compare password history to hashed passwords created by SqlMembershipProvider

I am using a SqlMembershipProvider and storing my passwords as hashed. I am also keeping a history of the (hashed) passwords in another table. I want to be able to compare the password a user tries to change their password to, to their old…
naspinski
  • 34,020
  • 36
  • 111
  • 167
5
votes
4 answers

How to add users and roles in SQL for the SQLMembershipProvider?

We are migrating to the production environment, and I want to write a sript the the DBA can create a user with the roles immediately after running the script I've generated with aspnet_regsql. In the Development environment, I have been adding…
Blanthor
  • 2,568
  • 8
  • 48
  • 66
5
votes
1 answer

ASP.NET SQL Membership Tables

What's the best way to tie my tables (like Customer, Orders) to the Users in the membership tables. Is there a way to tie it using an int somehow?
Rod
  • 14,529
  • 31
  • 118
  • 230
5
votes
4 answers

Is there an open source Asp.net membership administration GUI (like netwebadmin, but works online)?

Visual studio 2005 comes with a project that lets you use the asp.net membership provider to look up, add, edit, and delete users and roles. It unfortunaltly can't be used online, and in order to have an adminiistration area in your site, it appears…
NetHawk
  • 1,392
  • 1
  • 15
  • 33
5
votes
1 answer

SQL to create .Net Membership Provider users

I have a SQL script that creates users in in my database. It uses the .Net membership stored procs. At this point it works fine. The only issue is that the passwords are saved clear text. What should I change here to they are salted/encrypted (Not…
aron
  • 2,856
  • 11
  • 49
  • 79
5
votes
2 answers

requiresQuestionAndAnswer set to false in web.config but RequiresQuestionAndAnswer is true at runtime

In an ASP.net web application I have defined the following Membership provider in the web.config:
urig
  • 16,016
  • 26
  • 115
  • 184
4
votes
2 answers

Multi Tenant SQLMembershipProvider ASP.NET MVC

I am trying to move to Azure (including SQL Azure) with a multi-tenanted ASP.NET MVC application. Each customer gets their own database which is self-contained, including all of their membership credentials. We are able to set the connection…
4
votes
1 answer

Migrating from SqlMembershipProvider to Custom Provider

Here's the scenario: I have used default SqlMembershipProvider to implement membershp on a website. Now I'd like to migrate to my custom membership provider. (FYI the provide I use is CodeFirst Membership Provider. The problem is, the provider uses…
Kamyar
  • 18,639
  • 9
  • 97
  • 171
4
votes
2 answers

How to get the default asp.net membership provider name?

How can I get the default asp.net membership provider name from code (C#)?
4
votes
2 answers

Invalid Cast Exception calling SqlMembershipProvider GetUser

I am implementing authorisation on a web application using the ASP.NET SqlMembershipProvider, but it is randomly throwing an invalid cast exception when calling the GetUser method. I can log in, and navigate the pages all fine, but than at random…
Ira Rainey
  • 5,173
  • 2
  • 34
  • 42
4
votes
1 answer

How to join with LinQ to (typed) dataset?

i recently upgraded VS 2005 to 2010 and am fairly new to LinQ. Maybe somebody can put me in the right way. Background: I have a typed dataset and have the standard SQLMembershipProvider extended with a Table AccessRule. So a role can have…
Tim Schmelter
  • 450,073
  • 74
  • 686
  • 939
1
2
3
13 14