asp.net-membership

Custom Membership Provider not returning user

Hi, I have a custom membership provider I made up to use because our database is completely different than the ASP one. It does not have any fields such as PasswordQuestion, IsAnonymous, LastActivityDate...I mean our DB uses none of those and stores roles in the same Table as Users so I'm not sure if using the provider makes any sense. ...

Session Expires and User is no longer valid

I cache information about the currently logged in user in the session. This info lazy loads whenever a CurrentUser property on my global application class is used. It does this by calling GetUser() on my custom implementation of MembershipProvider, which either loads the user up from the session, or loads the user from the DB and throws ...

Problem with custom MembershipProvider in SharePoint 2010

I'm having a problem getting a custom membership provider to work in SharePoint. The login page is displayed, but when I enter any credentials - right or wrong - I get the following error: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) (C:\Program Files\Common Files\Microsoft Shared\Web Server E...

Role based authorization

Hi I am trying to use Role based authorization in declarative way, when unauthorized user attempt to access a page, it never fire an exception or show the user an error message. What I should do to show unauthorized message? is that possible in declarative way? using coding is not a nice option sense I have several roles, and folder a...

How do I code a RoleProvider against a datastore that doesn't define roles?

I'm looking at writing a custom RoleProvider to talk to an external third-party system. However, the "roles" I need aren't explicitly defined in the system but are instead based on conditions within the system. For example, a role might be defined as someone who is assigned to a particular committee or someone who is at a particular leve...

How can I use current user (default membership) as a data fied in DetailsView?

Hi, I am new to asp.net. I have a details view control on my page. I use linq to sql. My details view is an admin panel for data entry page. So some members will enter some news to my database. I want to use "Writer" Data Field to be filled automaticly with the current logged user. How can I do that? Thanks ...

How do I add an extra field using ASP.Net membership provider?

I have a basic app using the ASP.NET membership provider. By default, you can use a few fields such as username\password\remember me. How do I add to the asp.net membership provider so I can add an additional field "address" in the register section and have it save to the database. I currently see the following when creating a user in th...

Method throwing me out of parent method

I'm adding a User (custom class) through my Repository by hijacking the generic Add(T item) method and throwing it to a private AddUser method, if item == typeof(User). It does just that, but as soon as it hits the FlushMembership() call, it exits out too early, ie. it doesn't hit anything beyond that FlushMembership() call and thus no U...

Framework similar to Membership control in ASP.NET

Hi, I am curious to know that like we have different way for intersecting data (LINQ to SQL, Entity Framework, Enterprise Library, etc). Do we have alternatives for membership controls? Editing to eloborate it more: I mean to say that like to connect with the database we have various options like one can use Linq to SQL or Enterprise ...

Is it possible to access a profile without updating LastActivityDate?

In asp.net (using MVC, but this happens in regular too) Profile.GetProfile(username); will update the LastActivityDate for that user. This is not intended when someone else is viewing that user's profile. In the membership class you can specify whether to update this date with a second param, like so: Membership.GetUser(username, fa...

Using ASP.net credentials to log in from a WinForms application

Hello, We have an ASP.net application but some screens are deemed too slow to use by our users. As a result, we are trying to provide a WinForms-based alternative to those data-input centric screens so we can use richer controls like Grids with immediate screen updates and feedback for the user. Ideally, I would like the users to login...

ASP.NET Membership - Two providers on site

Hi, Our site has got two ASP.NET membership providers. The built in one, and a custom one (SqlMembershipProvider. I am able to log into both no problems, but I don't necessary require the ability to have both logged in at the same time. The issue I have is as follows: User "[email protected]" logs into the built in provider. They the...

ASP.NET Membership - Logged into two places at once

Hi, We have got two distinct lists of users that we need to power logged in access to sections of our site. These lists can't be combined, as one is synced daily to an externally hosted data source, and both tables have to be 100% the same. We have set up two Membership providers onto the site, but my question is, is it possible to all...

Pros and cons of the ASP.NET Login Controls?

ASP.NET provides a basic set of Login Controls that integrate with the ASP.NET Membership and Forms Authentication providers. I wouldn't mind being able to skip re-inventing the wheel on this kind of functionality, but I'm wary that there may be security, performance or usability reasons to consider rolling my own. Are there? ...

ASP.Net MVC 2 custom membership user role assignments are caching

Hello. I'm new to implementing custom membership/roles for ASP.Net MVC 2. I have membership/roles working in that a user can login successfully and can retrieve their role assignments. However, if I change their role assignments in the underlying database, those changes are not propagating through to the app. I removed all role assig...

With ASP.Net Membership, can a multiple Membership providers be used for login to the same website?

The situation is this: We have several (19) sites that are currently configured to share a single ASP Membership database using different applicationNames, such as: <membership defaultProvider="Site1Membership"> <providers> <add applicationName="/site1" name="Site1Membership" /> <add applicationName="/site2"...

ASP.NET Membership - A design for tracking additional information

I'm working on an ASP.NET4.0/C# application for a public site that needs to authenticate only the employees that work at the associated business. The idea is for the site to have a CMS such that employees can go in and make changes to certain content without having to work with any html. My question relates to the design and use of a AS...

How to manage significant functionality differences between user types in ASP.NET MVC2

I think I may have made a mess of my controllers. I have a fairly simple site that allows users of type "Staff" or "Client" to view Projects. Staff have access to all projects, can add and delete them, add and delete users, assign clients permission to projects, etc. As it stands this means I have a UserController and ProjectController,...

Google Ads doesn't support HTTPS. What alternatives are there?

It's pretty well known that Google Ads doesn't support HTTPS, but since I store my user's session in a bearer token/cookie I feel the need to encrypt this information... at a minimum so I can protect my end users from being hacked. What are my choices? I'm sure someone has come across this before. Ideas that may work include Changin...

I need my custom MembershipProvider to throw an exception on ValidateUser

I created a custom Membership Provider which is now working in production just fine validating my WCF calls. I do have an issue every now and then that for some unknown reason my provider cannot validate the user. In those cases I do not want the ValidateUser function to just return false, so I thought of throwing and excception with a ...