simplemembership

How to get error details on Azure Web site

假装没事ソ 提交于 2019-11-28 23:59:30
问题 I'm new to Azure. Does anybody know how get detailed error message on website deployed to Azure web? I added SimpleMembership to website and now Registration and Login (Post) are showing Sorry, an error occurred while processing your request. I'm connecting to DB on my home computer (no problem with connection). LogFiles folder on azure ftp server has some files but I don't see how to use this information. I wish I can get YellowScreen on azure... 回答1: You have two options: First, you can

SimpleMembership, MVC4, AuthorizeAttribute and Roles

二次信任 提交于 2019-11-28 23:09:34
问题 I’m trying to add authorize attributes to some of my MVC4 controllers, and they work fine as long as it’s a plan [Authorize] or [Authorize(Users="myuser")] , but the second I add in any sort of role filtering it falls apart, eg. [Authorize(Roles="admin")] . I then start getting errors like: Server Error in '/' Application. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the

How to migrate from SimpleMembership to ASP.NET.Identity

对着背影说爱祢 提交于 2019-11-28 20:58:30
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 from SimpleMembership to ASP.NET Identity suggests all I need to do is create an ApplicationUser and migrate the data, and other web searches give me sql scripts and passowrd hashing advice. But there are other loose ends that I'd like to clear up before I jump in. First - I have code to initialise the membership system in my Seed method: if (!WebSecurity.Initialized) WebSecurity

How to make WebSecurity.Login to login using username or email?

痞子三分冷 提交于 2019-11-28 17:17:18
WebSecurity.Login in simplemembership take username and password, how to make it to login the user using username or email instead of just username?, to make the user free to enter his email or username to login. You could inherit from the SimpleMembershipProvider and just override the ValidateUser method like this. public class ExtendedSimpleMembershipProvider : SimpleMembershipProvider { public override bool ValidateUser(string login, string password) { // check to see if the login passed is an email address if (IsValidEmail(login)) { string actualUsername = base.GetUserNameByEmail(login);

Using MVC 4 SimpleMembership with an existing database-first EF model

风格不统一 提交于 2019-11-28 05:04:38
I am trying to use SimpleMembership in my MVC 4 for the first time and I already have an existing database and EF5 model created based on it! I searched a lot but I cant find how I could use it in my case and also to have everything under my own model. It would be great if somebody can give me an idea how to do this. Thanks Purely as a point of reference, it might be a good idea to create a new Internet Application template of an ASP.NET MVC 4 Web Application project (i.e. via File > New Project). If you look at the AccountController , as @zms6445 says, it is decorated with an

ASP.NET Identity vs Simple membership Pros and Cons?

牧云@^-^@ 提交于 2019-11-28 04:31:27
In MVC4 we had Simple Membership . My opinion is that Simple Membership was a good Identity Model tried and tested with good documentation and didn't need to be fixed but simply needed an upgrade in terms of Email Verification/ Password Reset and all other stuff that we normally have to deal with when building an app. However the new ASP.NET Identity model seems achieve Something of sorts that Vista achieved over XP. I mean AspnetUserClaims and AspnetLogins could have been bunched together as UserAliases . And Microsoft should have provided some methods for the Email part of my babble. Having

webpages_UsersInRoles missing

本秂侑毒 提交于 2019-11-28 04:27:43
问题 I am using ASP.NET MVC 4 together with SimpleMemmbership. When I built my application the following tables were built automatically webpages_Membership webpages_OAuthMembership webpages_Roles I can successfully register users. However, the webpages_UsersInRoles table seems to be missing. Does anyone know why this table is missing? 回答1: This article might assist you in resolving your issue. Update: The article above got us going in the right direction. Our solution was to add a definition for

How am I supposed to use ReturnUrl = ViewBag.ReturnUrl in MVC 4

冷暖自知 提交于 2019-11-28 04:07:04
I'm working on 'ASP.NET MVC 4' application. I'm using/learning SimpleMembershipProvider and try to stick to the default logic created by VS2012 with the Internet template (if I'm not mistaken, the one with 'SimpleMembershipProvider' out of the box). I'm stuck at the AccountController where I just can't figure put how exactly I can use this method: private ActionResult RedirectToLocal(string returnUrl) { if (Url.IsLocalUrl(returnUrl)) { return Redirect(returnUrl); } else { return RedirectToAction("Index", "Home"); } } From what I understand the whole idea is to get redirected to the location

How can I customize simple membership provider to work with my own database ASP.NET mvc 4

爱⌒轻易说出口 提交于 2019-11-28 04:01:28
I’m exploring ASP.NET MVC 4 these days. I will be pleased if someone can help by answering my question . I am building an academic project "Project management and support system" . I have designed my own database , I have my own tables for the users in my database (two kinds of users : Employee who will execute tasks , and a client who assign/hire for tasks ) ,I was about creating a new membership provider but I realized that "It's a waste of time - reinventing the wheel". Now , I am building a membership model on ASP.NET MVC4 using SimpleMembership (It's the future of membership services for

ASP.NET MVC 4, The “WebSecurity.InitializeDatabaseConnection” method can be called only once

邮差的信 提交于 2019-11-28 03:38:15
问题 I am developing a code first web app in Visual Studio 2012 Express. I use this connection string in the web.config: <add name="myContext" connectionString="Data Source=.;Integrated Security=True;Initial Catalog=cityKingMVC4" providerName="System.Data.SqlClient" /> I am using SimpleMembership. I am trying to seed 1 administrator from Filters/InitializeSimpleMembershipAttribute.cs: ... WebSecurity.InitializeDatabaseConnection("myContext", "Users", "UserId", "Email", autoCreateTables: true); //