asp.net-membership

Anyone using ASP.NET MembershipProvider with Nhibernate?

天大地大妈咪最大 提交于 2019-12-25 03:14:31
问题 I'm trying to implement Membership controls in a mvc 2 application and i'm having trouble dealing with the MembershipUser class. I have my own data store (in Postgresql) and I'm using Nhibernate to deal with it from C#. The thing is, I have my own user class, but I can't use it with any provider I found that implements Membership, because all the functions return the predefined MembershipUser class and cannot return my own. I'm losing my mind here, is there any way i can work with this, or

Roles authentication works using Authorization attribute but not via authorization in web.config

和自甴很熟 提交于 2019-12-24 23:42:49
问题 I am using ASP.NET MVC 3 and am trying to do something that should be really straight forward... My application uses Forms authentication and that is working perfectly for controllers/actions. For example if I decorate either a controller or an action with the attribute below only members of the administrators group can view them: [Authorize(Roles="Administrators")] However I have a folder under the default Scripts folder called Admin. I only want members of the Administrators group to be

ASP.NET MVC Membership: Who should provide “returnUrl” to the LogOn method?

倾然丶 夕夏残阳落幕 提交于 2019-12-24 22:03:30
问题 Here's the definition of the LogOn post action method [HttpPost] public ActionResult LogOn(LogOnModel model, string returnUrl) { // more inside } I've a basic question. Does the framework supplies the string returnUrl ? or I do have that responsibility? Thanks for helping. 回答1: It depends on who is calling this method and whether this parameter is supplied in the POST request. For example if the user tries to access a controller action decorated with the [Autorize] attribute and he is not

(ASP.NET Membership) How do I add a new property to aspnet_Profile?

五迷三道 提交于 2019-12-24 21:25:50
问题 So I need to add two new properties to the Profile object for asp.net membership. I added these two items to the properties tag in web.config. <group name="Terms"> <add name="Promotions" type="Bool" serializeAs="String" /> <add name="AcceptedTerms" type="Bool" serializeAs="string" /> </group> In my code behind I am able to do Profile.Terms.Promotions and call Profile.Save() with no exceptions. However, the aspnet_Profile table does not seem to have the updated properties. Do I need to run

ASP Membership tables -> add new property to user?

江枫思渺然 提交于 2019-12-24 19:29:17
问题 I would like to start using ASP.NET's membership classes and tables with a new MVC4 project I am building. Let's say for example I want to keep track of user's birthdays. When creating the account, how do I add in the birthday? Is this something I keep track of with Profiles? I'm a bit confused on the correct way to add new 'columns' of data for users? 回答1: To specifically answer your question, here's how Microsoft advises to create extra tables for storing additional user information:

Membership System for Website and Mobile Apps

不想你离开。 提交于 2019-12-24 18:29:11
问题 I am currently working on a project that will have a website and apps for mobile devices. I am going to need a way to let users login to my site to view certain areas. I know I will need to build a WCF RESTful service but I am stuck on how to proceed with creating the users. I was originally going to use the built in .NET Membership but the more I read about it the worst it sounded if I had a lot of users. I then was thinking of building a new provider which would give me all the

How to Add a Parameter to Membership.CreateUser()

陌路散爱 提交于 2019-12-24 18:23:20
问题 CreateUser (string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status ); Membership.CreateUser (TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text, TextBox5.Text, true, out result); Can i override CreateUser() Function to add extra parameters as age and address and store these data into the corresponing Columns that i added in Membership Table in ASPNETDB 回答1: You have to

Going from dev to prod with .net Membership Provider

六眼飞鱼酱① 提交于 2019-12-24 17:52:28
问题 I use SQLExpress on my dev machine. I just posted my application to a new prod server with SQL Server installed on it... I have restored my SQL DB in prod and i am successfully connecting to the DB with my connection string. However, the membership provider seems to be failing to find my users in the DB. Am i missing a step to configure or "activate" the membership provide on the prod server? Any help would be great. Thank you. 回答1: I have a strong feeling it has to do with the

Server Error in '/asp.netwebadminfiles' Application - VS 2013

爱⌒轻易说出口 提交于 2019-12-24 17:43:12
问题 I'm working with ASP.Net web application and i want to create a membership user so i have to access the Web Configuration Tool for ASP.NET . i have run IISExpress commands in Prompt and it's works fine but whenever i run the http://localhost:5376/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=C:\Users\user\Documents\Visual%20Studio%202013\Projects\MyWebsite&applicationUrl=/ in the browser i got this error ! the error message : Server Error in '/asp.netwebadminfiles' Application.

Server Error in '/asp.netwebadminfiles' Application - VS 2013

落花浮王杯 提交于 2019-12-24 17:43:06
问题 I'm working with ASP.Net web application and i want to create a membership user so i have to access the Web Configuration Tool for ASP.NET . i have run IISExpress commands in Prompt and it's works fine but whenever i run the http://localhost:5376/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=C:\Users\user\Documents\Visual%20Studio%202013\Projects\MyWebsite&applicationUrl=/ in the browser i got this error ! the error message : Server Error in '/asp.netwebadminfiles' Application.