I have a custom Membership and Role Provider that I am setting up within an application. In ASP .Net Webforms I utilize the same providers and when the app is compiled and run the providers are initialized because of the references in the web.config.
When I move this to MVC and put break points in my "Initialize" methods for these cl...
I'm building a web application in ASP.NET and I want to separate it into three layers: Presentation, Data and Business.
I want to keep my database in the Data layer but I can't figure out a way to do that with the ASP.NET Memberships database (ASPNETDB.mdf).
Is there any way to tell the site to reference a database file in another pro...
To authanticate users in Asp.net Membership we can call method
FormsAuthentication.Authenticate(username, password)
how can I do the same job (generate session, cookies and all other staff that Authanticate does) without users password?
I'm trying to login user over facebook connect. User's facebook id is stored within the users dat...
I am wondering the best way about setting up asp.net membership in sql server to work well with linq to sql.
I'd like to use the username field for the foreign key relationships and have linq to sql recognise the asp user property.
I am having some problems getting relationships right between the users table and my other tables. Do I n...
We're using the standard ASP.net membership features that come with asp.net.
Certain accounts in our membership database have a "Locked Out" flag set to true - when/how does this happen?
...
I'm having trouble getting AD authentication working on my website. I have the following test code that works fine :
DirectoryEntry entry = new DirectoryEntry(srvr, usr, pwd);
object nativeObject = entry.NativeObject;
On my website I get an error "Your login attempt was not successful. Please try again.". I really haven't been able t...
Hello,
I was going through the AccountController class (the default one). I noticed that "_FORM" is used at many places with the ModelState. For, isntance:
if (String.IsNullOrEmpty(userName))
{
ModelState.AddModelError("username", "You must specify a username.");
}
if (!String.Equals(password, confirmPasswo...
I create a new user, approve them, then immediately attempt to authenticate with the credentials I just used to create the user...and get "false" back the Authenticate method.
string username = "me";
string password = "mypassword";
string email = "[email protected]";
Membership.CreateUser(username, password, email);
currentUser = Membersh...
I'm trying to figure out exactly when the event Profile_MigrateAnonymous fires.
My best guess from just tracing through my code is that it fires when it detects BOTH an anonymous membership cookie AND an authenticated membership cookie. Can anyone confirm this? I'm looking for real in depth answer here. Not just it gets called 'when a u...
Can I force a log out through SQL for asp.net membership account?
...
I have an Asp.net MVC project authenticating through AD. I would like to store audit information in tables for the current logged in user. What should I be storing in the database? I am currently using SamAccountName for my membership and role providers. Should I be using this? Should I use the more verbose and modern UserPrincipalName? ...
I have a WSS 3.0 site that uses forms authentication. In addition to my authentication cookie I get a cookie that contains data like this:
2FDiscovery=WorkspaceSiteName=aHR0cDovL3d3dy5rZWxldi5iaXo= path=/_vti_bin/Discovery.asmx;
This cookie does not have the Secure attribute set, even though I have requireSSL="true" in my web.config ...
We are talkign ASP.NET 2.0. I have already added the applicationName attribute to my providers group in the web.config. But still, when I clear out all the tables and run the app, when I add a user, it adds 2 records, one with an ApplicationName= the actual application name I specified, and another with ApplicationName="/".
Now, I did n...
I want to customize asp:PasswordRecovery control. I am using asp.net membership to control login etc.
How do I change "from" email-address on the email that sends the new password?
How do I change the content of the email that sends the new password?
...
I'm developing an ASP.NET system that has two different 'tiers' of roles. The main tier will use Active Directory groups to determine membership, while the second tier will use a database. All users will have a tier-1 AD role, but not all users will have a tier-2 database role.
I know I can use the AspNetWindowsTokenRoleProvider to mana...
I'm developing a fairly simple website for a friend and want to provide some admin access features using .Net membership authentication.
Is it possible to store the role/user/membership info in the web.config or some other xml file, instead of using a SqlServer database?
...
I have my forms authentication system working.
I found an odd behavior such that after successful Login; I was asked to Login again, if I browse to Login page from default page.
I was assuming that it should redirect me to default page since I am already authenticated.
Here's Web.config element I used:
<authentication mode="Forms">...
Hello,
3 Years ago I came across a really nice script. It was just an aspx and aspx.cs script, nothing more. It allowed me to see all the roles and users on site.
I could easily add/remove roles and add users to roles.
It used ajax for nice ui too.
Does anyone know where I can find this script?
I would like to use it again because s...
Hello,
I'm using ASP.Net membership to secure my site and I have a question about how to store extra user information. By googling and reading other questions I think the 3 accepted approaches to storing additional data
Profile framework - generally regarded as too restricting
Custom Profile provider - a little bigger than I want to ...
I've implemented my own Authorize attribute, and I notice that it queries to check permissions when I use [Authorize].
Is there any way I can get that permission and use it in the current controller that applies the Authorize attribute without having to rewrite and requery the code in the controller?
...