asp.net-membership

asp.net membership additional password policy rules

Hi folks, I'm using asp.nbet membership which very handily gives you the choice of enforcing a min password length and the minimum numeric characters. Can you define others like there must be one upper-case character, etc? cheers ...

asp.net membership select provider

Hi folks, I've done this before but can't remember how for the life of me. I used aspnetreg_sql.exe to create the membership tables in my database. But now i cant seem to be able to point my web app to the correct database. In the provider settings in asp.net management interface i only see a radio button with the label "AspNetSqlProvid...

Membership Generate Password alphanumeric only password?

How can I use Membership.GeneratePassword to return a password that ONLY contains alpha or numeric characters? The default method will only guarantee a minimum and not a maximum number of non alphanumeric passwords. I have the solution already but thought I'd share for future visitors. .. Answer coming up. ...

Asp.net override Membership settings at runtime (asp.net mvc)

I had an application that hooked onto 1 single database. The app now needs to hook into multiple databases. What we want to do is, using the same application/domain/hostname/virtual dir give the user the option on the login screen to select the "App/Database" they want to connect into. Each database has the App tables/data/procs/etc a...

Providing custom database functionality to custom asp.net membership provider

Hello friends, I am creating custom membership provider for my asp.net application. I have also created a separate class "DBConnect" that provides database functionality such as Executing SQL statement, Executing SPs, Executing SPs or Query and returning SqlDataReader and so on... I have created instance of DBConnect class within Ses...

asp.net membership db. Adding branches to a user

Hi everyone, I am playing around with the membership database and have a question. Lets say I have a company called company ABC. There are 10 branches that belong to comapany ABC. IS there anyway to create a relationship within the database using company ABC as the parent and having the 10 branches as childs? I hope that makes sense :...

Can I use a custom Membership provider for use in an asp 3.5 .net windows authentication application?

In an Intranet asp.net application, I need to use Windows authentication, however, I must filter user access to the application. I also have to use an already defined database schema with the users info and profile, so I must handle the ValidateUser. How can I use a custom membership provider with windows authentication? Thanks in adva...

LINQ and SQL performance issue when working with Membership

I am using ASPNET membership with 50000 records, and we have another table called "scm_Users" which has exactly number of records, they are NOT linked by any key. I have a simple SQL: select * from dbo.aspnet_Users a, dbo.scm_Users b where a.UserName = b.UserName I can get 50000 records in less than 1 second. In LINQ, (using Entity F...

Access a webservice behind a membership provider

I have one website that hosts a webservice which uses membership provider authorization. I would like to be able to authenticate through my webservice call from a second site without getting bounced back to my login page on the webservice site. How can I accomplish this? As a side note, it would be best for me to allow a custom rule f...

ASP.Net Authentication with MVC2--how to integrate with DB?

I'm trying to understand the authentication section of the sample project that opens in a new MVC2 project in VS2010. It essentially lets you register, login, etc. I looked through the code that implements this briefly, it looked fairly complicated. (10 tables, 40 sprocs, 10 views, 4 models, 1 model, 1 controller, etc.) Is it best to...

How can I configure membership provider to insert data on my own database

How can I configure membership provider to insert data on my own database ...

Using MembershipCreateStatus in MVC

How can I use the MembershipCreateStatus in my controller below to identify errors? My controller below creates a new user but I would like to catch any errors from CreateStatus and add the error to my modelstate. I keep getting errors for status below. [HttpPost] public ActionResult CreateUser(user UserToCreate) { ...

Does UserId data type affect FormsAuthentication.SetAuthCookie(UserId.ToString(), false)?

Does the original data type of the username string in a call to FormsAuthentication.SetAuthCookie(...) make any difference with regards to security or code maintainability? As I understand it, the cookie is encrypted and used to identify a user on each request. I'm curious whether it should affect the design of the primary key on my Use...

Is there any real benefit to using ASP.Net Authentication with ASP.Net MVC?

I've been researching this intensely for the past few days. We're developing an ASP.Net MVC site that needs to support 100,000+ users. We'd like to keep it fast, scalable, and simple. We have our own SQL database tables for user and user_role, etc. We are not using server controls. Given that there are no server controls, and a cu...

Implementing a Suspension or Penalty System for Users in ASP.NET MVC

I'm writing a site in ASP.NET MVC that will have user accounts. As the site will be oriented towards discussion, I think I need a system for admins to be able to moderate users, just like we have here, on Stack Overflow. I'd like to be able to put a user into a "suspension", so that they are able to log in to the site (at which point the...

UrlHelper and ViewContext inside an Authorization Attribute

I have a scenario that I haven't been able to solve: I'm toying around with creating my own custom authorization attribute for mvc. The main bit of functionality I would like to add is to have the ability to change where the user gets redirected if they are not in a certain role. I don't mind that the system sends them back to the login...

Creating Membership Tables, SPROCs, Views in Attached DB

I have AdventureWorks database mdf file in my VS 2010 project. Is there anyway I can create Membership tables inside my AdventureWorks database. I know I can detach the database attach in SQL SERVER 2008. Create the tables and then detach. But I don't have SQL SERVER 2008 and I want to see if this can be done using command line tool. I...

using eval in server side code on asp.net page

<asp:Repeater ID="rptrParent" runat="server"> <ItemTemplate> <li> <a href="<% =ResolveUrl("~/cPanel/UserView.aspx?User=")%><%# Eval("StudentUserName") %>"> <span> <% ProfileCommon pc = new ProfileCommon(); pc.GetProfile(Eval("StudentUserName").ToString()); ...

asp.net membership - can roles be added to the new user control?

hi folks, I'm using the asp built in membership controls, etc. There is a new user control that I wanting to use but this doesn't seem to give the option to set the roles for the user. Anyone know of how I can achieve this? -- Billy ...

membership change password

how can i change password manual directly in table membership? passwordformat=1, so how can i crypt password before insert into table? ...