Questions tagged [simplemembership]

SimpleMembership is the default membership provider in ASP.NET MVC4. It supports a customized User table and OAuth.

simplemembership
Filter by
Sorted by
Tagged with
0 votes
1 answer
296 views

Everytime we publish our .NET app on Azure, users are logged off

Everytime we publish our .NET app on Azure, all users are bein logged off and to sign in again, what our users won't understand. The user sessions are implemented using the SimpleMembership provider. ...
sk904861's user avatar
  • 1,257
4 votes
2 answers
412 views

Foreign key issue when adding user to role with SimpleMembership (MySQL)

I'm trying to use SimpleMembership with MySQL in a Code First project. This is the initializer I made: WebSecurity.InitializeDatabaseConnection("MyConnectionStringName", "UserProfile", "...
Jens's user avatar
  • 139
2 votes
0 answers
448 views

Can't add user to role with SimpleMembership (MySQL)

I'm trying to use SimpleMembership with MySql in a Code First project. This is the initializer I made: WebSecurity.InitializeDatabaseConnection("MyConnectionStringName", "...
Jens's user avatar
  • 139
0 votes
1 answer
417 views

Unable to bind ViewData to a dropdown list

I am working on an asp.net mvc 4 application where I am trying to add delete a user functionality for an admin where I should be able to select a user from dropdown list and delete him. private ...
DoIt's user avatar
  • 3,368
0 votes
2 answers
224 views

populating a dropdown box with list of users in UserProfile table to delete a user

I am working on an asp.net mvc 4 application where I am trying to add delete a user functionality for an admin where I should be able to select a user from dropdown list and delete him. I was able ...
DoIt's user avatar
  • 3,368
0 votes
1 answer
358 views

Reset or recover a user's password by an admin using a username in SimpleMembership

I am working on an ASP.Net MVC 4 application where it uses SimpleMembership and I have two types of user one is normal user and an admin. I am trying to add a feature where an admin can reset a normal ...
DoIt's user avatar
  • 3,368
1 vote
1 answer
235 views

SimpleMembershipProvider WebSecurity.InitializeDatabaseConnection The login from an untrusted domain

I export the database to the server and I've problem. When I start application I see this error An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not ...
Andrzej's user avatar
  • 13
5 votes
1 answer
4k views

How to migrate from SimpleMembership to ASP.NET.Identity

Migrating from MVC4 to MVC5 and want to use ASP.NET Identity too but I am struggling to find anything that covers everything I think I need to do to migrate the Identity. Migrating an Existing Website ...
Colin's user avatar
  • 22.4k
2 votes
1 answer
291 views

Why MVC Simple Membership token returns null when i want to register second user?

I dont know what the wrong is but I cant take membership the token for the second user. I can easily register the first user but when i wanted to register second user, token comes null. I can get the ...
livefreeor's user avatar
1 vote
1 answer
136 views

User.IsInRole failing after migrating to Identity 2.0

I have recently updated my MVC 4 application to MVC 5 and Identity 2.0 however I'm having difficulty to get it working. After logging in I get the error "No user found was found that has the name" and ...
Robert Parkinson's user avatar
0 votes
1 answer
447 views

Register _LoginPartial if(Request.IsAuthenticated)

I'm hitting a dead end with this one. I'm new to MVC and I see similiar issue appearing on SO, but it does not help. I'm basically trying to set a Register action, and once user is registered ...
Turo's user avatar
  • 1,567
0 votes
2 answers
266 views

MVC4 simplemembership not working after publish

I have the following problem with using MVC4 SimpleMembership: Register and Login methods work fine in local debugg mode, but after publish they crash the site. The cause from what i saw is that for ...
Florin Iorga's user avatar
1 vote
1 answer
109 views

Roles.AddUsersToRoles() requires IDENTITY_INSERT is ON

Migrated from LocalDB to SQL Server. Trying to add role to user: if (!Roles.GetRolesForUser("admin").Contains("Admin")) Roles.AddUsersToRoles(new[] { "admin" }, new[] { "Admin" }); ...
Arman Hayots's user avatar
  • 2,488
1 vote
0 answers
119 views

WebSecurity.InitializeDatabaseConnection on session start or request

I've got an application that I'm trying to convert from a uni-tenant (single client, separate database, separate website) solution, to a partially multi-tenant one (single client, separate database, ...
reidLinden's user avatar
  • 4,060
0 votes
1 answer
4k views

ASP.Net MVC 5 -Attempt by security transparent method 'WebMatrix.WebData.SimpleMembershipProvider.ValidateUser to access security method failed

I am using Simplemembership in my asp.net web api project. When i try to validate the user using the below code, i get the error(Error 1) if (!Membership.ValidateUser(username, password)) { ...
WonderHeart's user avatar
3 votes
1 answer
672 views

Create two joined tables with ASPNetUsers table or to extend the ASPNETUsers table?

The application should have customers and sellers and another table for goods/items, First scenario is to extend the AspNetUsers and make it usable for both customers and sellers and differentiate ...
Bashar Abu Shamaa's user avatar
0 votes
0 answers
89 views

Multiple SimpleMembership Providers

Is it possible to use multiple simple membership providers? and if it is possible, how can I switch between them in my asp.net mvc application? UPDATE: I tried to define two simple membership ...
volkh4n's user avatar
  • 412
0 votes
1 answer
20 views

Querying the users table in db, doesnt reflect changes

I´m having this table, "Users" where i store UserID, Email and CompanyID. I´m using simplemembership on the site. When a user log in, everything is ok and i can access the CompanyID, but if i change ...
mikedomain's user avatar
0 votes
1 answer
54 views

Role of PasswordSalt witn SimpleMembershipProvider

I analyzed the CreateAccount method from SimpleMembershipProvider and there I found PasswordSalt is not stored up in Database and only the hashedpassword is being saved. Is that not neccessary to ...
user avatar
0 votes
1 answer
488 views

Asp.net Membership and Simple Membership

What is the difference between Simple Membership and Membership in asp.net? Is Simple Membership introduced in mvc 4.0?
rehan yaqoob's user avatar
3 votes
4 answers
43k views

Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies [duplicate]

My project is working on my local pc. But when i put it on the server i got that exception. I tried to check assemblies add/ remove or re install but it didn't work anyway. I found some posts about ...
Abdullah Semih AYYILDIZ's user avatar
0 votes
0 answers
166 views

ASP.NET in Visual Studio 2013 with Simple Membership: How to View ALL USERS

I created a website in ASP.NET MVC 4 and used the built in simple membership. I registered as a test user and logged in. I just want to be able to have a database view of these users that register ...
swinkel's user avatar
  • 220
0 votes
2 answers
1k views

Override a controller's [Authorize(Roles="X")] filter in an action of that controller

In an MVC app certain controller has access restricted by a role (there is an Authorize filter with a role attached to controller). Now the client decided that one of the actions in this controller ...
jahu's user avatar
  • 5,547
1 vote
1 answer
3k views

ASP.NET MVC4 Simplemembership or autoFormsAuthentication?

I'm new to ASP.NET MVC4 and therefore read many things about how to authenticate on an Intranet Website. I've inherited of this type of project in order to improve it and after quick reading the ...
Arnaud F.'s user avatar
  • 8,362
0 votes
2 answers
477 views

Get all roles of any user (yes, not currently logged one)

In an MVC app, administrator has a CRUD controller for managing users. Now, the functionality of the edit part needs to be extended and it involves adding a number role dependent tabs. They depend on ...
jahu's user avatar
  • 5,547
1 vote
0 answers
36 views

Multiple SimpleMembershipProviders

I have multiple customer websites on one server that all have their own databases with their own SimpleMembershipProvider. I also have a Windows Service (using Quartz.NET scheduler) that does various ...
ysub's user avatar
  • 221
2 votes
2 answers
171 views

Can I load SimpleMembership classes into EntityFramework?

I've been trying to load the standard ASP.NET SimpleMembership (SM) classes into my EntityFramework (EF) model, but keep running into a few brick walls. I want to use the UserProfile table as a class ...
shmow's user avatar
  • 641
0 votes
1 answer
232 views

ASP.NET MVC Login Not Sticking

I'm having an issue with my ASP.NET MVC 5 simple membership provider login code. The code is as follows: [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public ActionResult ...
Paul Smith Jr's user avatar
1 vote
0 answers
60 views

Trying to use forms authentication with AD but app errors out with missing SimpleMembership database

I have a simple app: http://locahost/ITSuggestionBox that takes a user to a comment box and they submit that data, which is stored in a database. I have another page: .../Details where the ...
Jig Bhakta's user avatar
0 votes
2 answers
53 views

SimpleMembershipProvider intermittently returning wrong user

I am administrator of a small practice project web application, AngularJS front-end pulling its back-end data from a C#/.NET WebAPI, and I'm handling security using the SimpleMembershipProvider. I ...
rosalindwills's user avatar
0 votes
1 answer
721 views

How to create a session number from the ASPXAUTH cookie?

I would like to make a human readable number from the cookie value to be used as a session number. It should be unique relative to the user id. I know how to retrieve the cookie, I would be ...
Dan's user avatar
  • 1,675
0 votes
1 answer
231 views

Does i need to apply Sessions in ASP.NET for log in/log out if im using SimpleMembership in MVC?

I am new to web development so, do i need to implement sessions while i am using SimpleMembership as i was having problem with back button after logs out. It goes to the previous page instead of ...
Hassaan Javaid's user avatar
0 votes
1 answer
245 views

SimpleMembership with ASP.Net MVC 4 project

I created a MVC 4 project using MS Visual Web Developer 2010 Express. It by default uses "SimpleMembership" and it connects to a database (A) on my local SQL Server. I ran the web project and ...
alextc's user avatar
  • 3,356
0 votes
1 answer
319 views

MVC 4 user get logged off quickly

I have an MVC 4 web application that log off some users quickly. The authentication cookie seem stetted up correctly (I also setted timeout to 720 (12 hours)). I also setted session timeout on config ...
Alex Samson's user avatar
2 votes
1 answer
3k views

Add Existing Membership/Role Provider to new WebAPI with Basic Authenication

Ok apparently there's nothing "Basic" about "Basic Authentication" when it comes to a WebAPI project and an existing database...but I digress. Situation: Existing asp.net Website App (WSP) with ...
Indy-Jones's user avatar
0 votes
1 answer
373 views

SimpleMembership - WebSecurity GetConfirmationToken Problems

I'm building an application which is close to completion, I'm adding in the final layers of security and functionality for emailing new user's a confirmation token when they register. Getting the ...
Damian's user avatar
  • 606
0 votes
0 answers
72 views

Why won't Mvc 4 application pick up email column added to UserProfile table?

As the question suggests I added an email column to the UserProfile table. (As I need a valid email address for each user) However when I try to access this in a "Lost Password" feature, I get the ...
mkell's user avatar
  • 721
0 votes
1 answer
697 views

Entity Framework Code First with SimpleMembershipProvider

I have two projects inside one solution: foo.Domain (Class Library, my entities and DBContext are in here) foo.WebUI (ASP.NET MVC 4.5, empty template) Inside foo.Domain i create my entities and ...
Mindless's user avatar
  • 2,372
1 vote
1 answer
2k views

Why I cannot validate duplicate email address in user register action in ASP.NET MVC4

This is really starting to get to me. Basic enough , I want to prevent the user from registering with an email which already exist's in the UserProfile table. I tried the following in my Register ...
mkell's user avatar
  • 721
0 votes
1 answer
201 views

Is there a way using SimpleMembership Provider to login using the webpages_Membership table encrypted password field

Our system is built using MVC4-EF6-SimpleMembership. I'm struggling for 2 days now with how to enable an affiliate company website to login to our system. What I wanted to implement is a simple GET ...
ilans's user avatar
  • 2,627
0 votes
1 answer
152 views

How to introduce Simplemembership to an existing MVC 4 application?

I know the question looks very broad. Basically I have an existing MVC 4 application which I based around the tutorial found in the ebook Pro ASP.NET MVC 4, 4th Edition. I am working with an existing ...
mkell's user avatar
  • 721
3 votes
1 answer
1k views

WebAPI + SimpleMembership + WebSecurity - can never authenticate?

I'm trying to implement a single-page app. I carried over some of my working code from another project (MVC4) to implement authentication. Right now I see cookies being set, but WebSecurity / User....
RobVious's user avatar
  • 12.8k
0 votes
1 answer
894 views

column does not allow nulls. INSERT fails error in simple membership mvc5

My point is to able to use SimpleMembership. Firstly, I created roles in my Global.asax.cs class. Database.SetInitializer<UsersContext>(new InitSecurityDb()); UsersContext ...
melomg's user avatar
  • 747
3 votes
1 answer
3k views

What is the difference between MVC5 identity and MVC4 simple membership?

I am building an MVC 5 application and the build in membership function in a basic MVC 5 project is MVC5 Identity. I am familiar to MVC 4 simple membership, but i want to use the new functions of MVC ...
user3959430's user avatar
0 votes
0 answers
75 views

Add account field to asp.net forms authentication

What's the best way to implement an additional user identifier in an ASP.NET forms web application? At the database level a user is identified by a user and account number. userA AccountA passwordA ...
BigSkyRunningCoder's user avatar
0 votes
0 answers
91 views

Stop Google OAuth reprompting for permissions

I have Google authentication working in my app through OAuthWebSecurity. Every time I login, Google re-prompts for permissions. How can I prevent Google from re-prompting every time? I am currently ...
Vegard Larsen's user avatar
0 votes
0 answers
103 views

OAuth User Registration - ASP.Net 4.5

I'm currently in the beginning stages of developing a website using ASP.Net 4.5 and C#. I'm wanting to map out the process flow of user registration and authentication. There's a starter project ...
Jeffrey Kern's user avatar
  • 2,024
0 votes
1 answer
259 views

Get UserId right after login without reloading page

In an MVC app UserId of current user can be obtained using WebSecurity.UserId, but if I do that during the login action it will return -1. The reason for that is explained here and here. Basically the ...
jahu's user avatar
  • 5,547
0 votes
1 answer
1k views

Redirecting to login doesn't work if current url already contains ReturnUrl

Some background: Our client wanted a number of actions to return to the previous action when done. For example, if he was on a list view of objects and he clicked on "create new object" button, he ...
jahu's user avatar
  • 5,547
2 votes
1 answer
232 views

Log all other browsers out on login

I have a project running MVC4 and using Simple Membership for authentication. I only want to allow a user to login on one browser. To make this transparent to the user, I need a way to have any ...
Todd Skelton's user avatar
  • 7,039

1
2
3 4 5
12