asp.net-membership

Membership Provider users in different tables

I have an existing database with users and administrators in different tables. I am rewriting an existing website in ASP.net and need to decide - should I merge the two tables into one users table and just have one provider, OR leave the tables separated and have two different providers. Administrators, they need the ability to create, ...

ASP.NET MVC Authorize by Subdomain

I have what seems like a common issue with SaaS applications, but have not seen this question on here anywhere. I am using ASP.NET MVC with Forms Authentication. I have implemented a custom membership provider to handle logic, but have one issue (perhaps the issue is in my mental picture of the system). As with many SaaS apps, custo...

aspnet_regsql not working at all

I would like to create the ASP.NET User database template on a database of my own, because I'd like to fully untegrate the user system with the rest of my DB. As I've read, i needed to use the aspnet_regsql tool. I put all the options (because my database is running on SQLEXPRESS and is in an mdf file in my project's folder). the program...

User.Identity.Name returns comma separated list of logged in session usernames

We recently deployed a new ASP MVC application to our live environment but have been experiencing intermittent issues with users logged sessions. After a lot of logging etc we finally saw the error to be that: User.Identity.Name returns a comma separated list of all the particular users logged in sessions. We do have other asp based si...

Sort order of aspnet_Users table

I am wondering if the aspnet_Users table is always sorted (by UserName) even if I add new users which are alphabetically between two already existing users. I've noticed that the method Membership.GetAllUsers() always seems to return a sorted collection of MembershipUsers. Also when I look into SQL Server Management Studio and run a si...

Using the ASP.NET membership provider database with your own database?

Hello everybody, We are developing an ASP.NET MVC Application that currently uses it's own database ApplicationData for the domain models and another one Membership for the user management / membership provider. We do access restrictions using data-annotations in our controllers. [Authorize(Roles = "administrators, managers")] This ...

Asp.Net membership via ASP.NET Website Administrator Tool

I created a database with aspnet_regsql, the database was created in sql sever 2008 and not in data folder in my project (do I need to move it to the folder manually?). Next, in Web Site Administration Tool I went to provider section and clicked don Test button. I got an error: Could not establish a connection to the database. If ...

SqlMembershipProvider where IIS and SQL are on different machines?

We're moving one of my websites to production. Because of a firewall and the website and database being on different machines, the website can't connect directly to the SQL server. We've set it up so we're running all of the database access through a WCF service. All of this works fine. The problem, however, I've discovered lies in t...

Dealing with expired authentication for a partially filled form?

I have a large webform, and would like to prompt the user to login if their session expires, or have them login when they submit the form. It seems that having them login when they submit the form creates alot of challenges because they get redirected to the login page and then the postback data for the original form submission is lost....

Convert ASP.NET membership system to secure password storage

I have a potential client that set up their website and membership system in ASP.NET 3.5. When their developer set up the system, it seems he turned off the security/hashing aspect of password storage and everything is stored in the clear. Is there a process to reinstall/change the secure password storage of ASP.NET membership without c...

Using the string resources of ASP.NET membership provider in a custom control

I have the request to build a custom control for ASP.NET membership. The control is a kind of CreateUserWizard, but somewhat special. The users are created by our account executives. At their first log in the users enter their user name and initial password, change the password and enter additional information (email) in one transaction!...

How to get the userID from a custom ASP.Net Membership Provider w/ non-unique usernames?

I've created a custom asp.net membership provider that authenticates against a legacy database. The problem I'm running into to is how to handle users that have same username. I've repeatedly tried convincing my boss that a username should be unique but this has been to no avail. Update: It does seem to be fundamental flaw with the au...

Custom ASP.Net Membership and the Login control

I am creating a custom membership provider for a web app that already has it's users stored in an existing database table. I used some code from a tutorial to help jump start my provider but I am a bit lost on how i can interact with the actual log in process. My custom provider has an override method for ValidateUser() and at the momen...

Multiple applications using same login database logging each other out

I've set up two ASP.NET applications on a machine, their web.config files contain the same applicationName value in AspNetSqlMembershipProvider item so they share users and roles. The problem sequence is: user logs into application A, opens new tab in a browser logs into application B, his login in application A is signed out and vi...

Two asp.net applications to use the same membership tables - specifically user login data

HI, I have created a asp.net solution with two applications. They bothe use the same database which is setup with .net membership and roles. Application 1 uses the membership for sauthentication to an administration area - this works fine. Application 2 - has a different applicationID to App1. I want to be able to use the existing user ...

ChangePassword control without provider

Hello, Is there a way to make ChangePassword control work without Membership provider? Like the same way Login control works through an Authenticate event, could I make this component to use my password changing function and then showing success view without me writing custom provider? Thanks, Eugene. EDIT: Just to clarify after som...

Run both Authorize Filter and Action Filter on unauthenticated ASP.NET MVC request

I have decorated my base controller with a couple of action filters. They work fine. One of those filters sets up the request - does things like set the culture based on the domain, etc. I also have a handful of actions that require authorization using the Authorize attribute. My problem is that when an user attempts to request a p...

Searching for flexible way to specify connection string used by APS.NET membership

Hi, I develop an asp.net web application and I use ASP.NET membership provider. The application uses the membership schema and all required objects inside main application database However, during development I have to switch to various databases, for different development and testing scenarios. For this I have an external connection st...

Wrap a LINQ datacontext and non linq stored procedure into a transaction?

Is it possible to wrap some "external" API code AND a LINQ data context into a transaction? In my case, I want to wrap the ASP.NET 2.0 Membership API calls AND my own LINQ operations into a transaction. ...

Can I use multiple MembershipProviders at one time?

I've got multiple membership providers in my web.config and in my login control, I am going to use the provider based on a drop down list with the name of the provider. Web.config: <system.web> <membership> <providers> <remove clear /> <add name="MyOwnProvider1" .... /> <add name="MyOwnProvider2" .......