asp.net-membership

asp.net create uzer wizard getting a handle on controls in custom steps

心已入冬 提交于 2019-12-11 02:33:34
问题 I have added an extra step to my uzerwizard <asp:TemplatedWizardStep id="stpPayment" runat="server" Title="Payment"> <ContentTemplate> <asp:DropDownList ID="cmbSubs" runat="server" ClientIDMode="Static" Width="200px"> <asp:ListItem Value="month">Monthly Subscription</asp:ListItem> <asp:ListItem Value="year">Annual Subscription</asp:ListItem> </asp:DropDownList> i am successfully navigating to the new step protected void NewUserprofileWizard_NextButtonClick(object sender,

Cannot utilize SImpleMembership features when hosting on Azure

二次信任 提交于 2019-12-11 02:32:02
问题 Basically my ASP.NET MVC4 project works fine when running locally. However when I host it on Azure I get an error when trying to register a new account: Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. Stack trace: [FileNotFoundException: Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken

Login failed for user ''

ⅰ亾dé卋堺 提交于 2019-12-11 02:08:44
问题 I have a an ASP .Net MVC website which works fine when testing locally. I have put the website onto IIS 7 on our windows server 2008 machine. The website uses .net membership provider and when I try to login I receive the following error: Login failed for user ''. This is the membership connection string: data source=(local);Integrated Security=SSPI;Initial Catalog=db The site is running in IIS in its own app pool with managed pipeline set to integrated and its Identity is LocalSystem, and

What is the minimum ASP.NET provider implementation I need to get a user authenticated and authorized?

允我心安 提交于 2019-12-11 01:59:44
问题 By default ASP.NET MVC setups up the AccountController to use the SqlMembershipProvider, SqlProfileProvider and the SqlRoleProvider. I don't really need everything that brings to the table, in fact, it is more of a hassle to shape my data into that model. What is the minimum I need to implement on the MembershipProvider, RoleProvider and ProfileProvider abstract classes to get authentication and authorization and not break some other dependency that might be there? For instance, on the

Logging users in automatically via an URL

旧城冷巷雨未停 提交于 2019-12-11 01:17:36
问题 I am providing registered members of a website a weekly mailing which contains URLs to private pages on the website. For usability purposes, I don't want the user to have to provide their credentials after they click on the URL. I am using the ASP.NET Membership provider model. Question How can I implement this so that the user can be logged in by virtue of clicking a specialized URL link? 回答1: You could send them a URL with a very long, randomly generated number (e.g. a GUID), which is also

Windows authentication hybrid

╄→尐↘猪︶ㄣ 提交于 2019-12-10 22:46:37
问题 I am using windows authentication for an intranet MVC application. I want to add additional logic to the authentication process. In other words as well as existing in AD, the user must also exist in a custom database before they are authenticated. They should also be to log out of the MVC app, and login again with the same AD identification, but with a different department selected. I'm not sure of the best way of approaching this, as switching on windows authentication prevents any custom

Maintain ASP.Net membership passwords during machine key change

核能气质少年 提交于 2019-12-10 20:04:42
问题 Is there an utility or code sample that can decrypt with the old key, and then encrypt passwords with a new key for ASP.Net membership users? 回答1: None of the workarounds mentioned worked for me. My solution is below. It involves first storing passwords in clear text and then reencrypting them again with new MachineKey. Machine Key Change 回答2: This is my best guess at a solution, but I haven't had a chance to test it. It relies on the following settings for your current provider:

Membership.GetUser(username) - how to return correct casing?

我的未来我决定 提交于 2019-12-10 17:51:55
问题 I am getting the username from the URL so blah.com/kevinuk. I want some content on the page to say KevinUK which is whats stored in the membership table but when I do the following, it returns the same casing as what the input was. MembershipUser member = Membership.GetUser(user); string userName = member.UserName; How do I use a lowercase username as the parameter and return the value from the database with the correct casing? 回答1: It's not clear which Membership provider that you are using,

ASP.Net User forgot answer to password question

血红的双手。 提交于 2019-12-10 17:42:52
问题 How can I reset a password for a user who forgot both the password and the answer to the password reset question? I'm using ASP.Net membership. 回答1: Assuming your membership provider ("AspNetSqlMembershipProvider") in Web.config has requiresQuestionAndAnswer="true" , make a second provider (such as "AspNetSqlMembershipProviderAdministrativeReset") with all of the same settings except for requiresQuestionAndAnswer="false" . Then you can create an action that explicitly uses the second provider

'AllowAnonymous' could not be found

我是研究僧i 提交于 2019-12-10 15:47:23
问题 Everything worked fine until I installed (Package Manager Console) the postal package, then uninstalled and installed an older version. Now I get an error where it previously was not. Error: The type or namespace name 'AllowAnonymous' could not be found (are you missing a using directive or an assembly reference?) Who knows how to fix this? 回答1: Probably you are missing the reference to System.Web.Http assembly in your project? So you need to: Add the reference to System.Web.Http ; Add using