How To Add A New Field In Web Application Membership
Jan 21, 2010I want to add a "DisplayName" property to the membership class different from userName. I am not using the Profiles, can this be done?
View 2 RepliesI want to add a "DisplayName" property to the membership class different from userName. I am not using the Profiles, can this be done?
View 2 RepliesI have two .NET applications X and Y
a. I want to have User A as a common user for both application X and Y.
b. User A can have different roles on X and Y. Eg. Read permission on Y and Write Permission on Y.
How do i configure ASP.NET membership to achieve about functionality.
Apologies if this seems obvious, but after a week searching I can't find a clear answer to my problem.
I have developed an application in Visual Web Developer 2010 Express that uses the asp.net application services membership provider. It works well in development on my machine (data in the ASPNETDB.MDF database).
I packaged my application and deployed the relevant files with FTP to my shared hosting provider.
I took a copy of the ASPNETDB.MDF and restored it to the SQL Server 2008 on my shared hosting. I can connect to this through the Database Explorer in Visual Web Developer, but it doesn't contain any schema or data.
I know once I have the database in production I will have to make sure the connection string in web.config is poiting to it, but I don't know how to get the DB to production in the first place.
I have set up Membership and Roles and can create users and login using the ASp Login control. However I need to associate users with customers (in a Customers table in the database) and display content according to the customer that the user belongs to. Is the best way of doing this to create a foreign key field in the aspnet_Users table relating back to Customers table which would have to be updated manually after creating the user or is there a better way?
View 1 RepliesIs it possible to more fields in User table If yes, how to do that? share sample code. Do we we need to change any membership stored procedures?
View 3 RepliesI'm not familliar with the membership provider class. On my create user page I have the following code
[Code]....
If I want to add some fieds like phone number and address, how can I do it? And what happen to the following function if those fields are added.
[Code]....
We are using ASP.Net Membership provider for user management module in our WPF based application. It seems to be working fine. But now we want to localize our WPF application, and don't know how to do that with respect to the data stored as part of Membership Provider. Is Localization supported by Membership Provider ?
View 2 RepliesI have an MVC application which uses the Membership services.I am importing a user list from another application that doesn't have any sort of Membership use, so I'm just using a csv file for the import, and writing a standalone C# app to do it. How do I get the standalone app to use the MVC application's database? The code works, in that calls to Membership.CreateUser are returning, but I'm not seeing the users appear in the correct database. So if the database is on my local machine and called "FooBar" how do I tell the Provider to use that instead of whatever default it's using?
View 5 RepliesI'm trying to convert an ASP application to a .NET one. In the old ASP application methodology we have a "users" database with all our users and is indexed by an auto-increment integer which is used across our database (~25-30 tables) relationally. I'm recreating the tables from scratch, so no need to worry about merging data. Let's assume we just have a large relational database that we want to connect to the .NET security model.
Now - with .NET, there is the concept of members and roles being handled for you. I took a look at the aspnet_Users table and it shows a GUID for members I created using the ASP.NET Configuration tool.
Basically I need advice on how to link the ASP.NET user's login to my custom database. Any tutorials/links are welcome, I'm not afraid of reading!
It would be great for the Context.User.Identity.Name to store the auto-increment integer PK as well because that could be used in all of my SQL queries to grab information for given users.
p.s. I'm trying to write it as an MVC2 application with a lot of Linq to SQL to keep it all strongly typed and awesome.
I'd like to know if its possible to use two membership providers within a single application. I need to have a membership provider "power users" and administrators on a site and a different one for clients and customers who will want to register on the site. I'd like to know if its possible to have two different membership providers to handle these two different sets of users. If it is, how do i go about it?
View 4 RepliesI'm working in Visual Studio 2010 Professional. I have a web application based upon the standard ASP.NET Web Application, which contains the aspnetdb.mdf SQL Express database for forms based security. For testing deployment, I'm trying to use the Publish option to publish the web app to IIS 7, which exists on the same machine that I'm building the web app on. The machine is running Windows 2008 R2.
I went through the Help file to set up the deployment of the database, using the Package/Publish SQL tab in the site properties. I followed the help file to the letter, or so I thought. I go to publish to the virtual directory I set up on IIS and it gives me errors, specifically saying the following:
Web deployment task failed.(The database'|DataDirectory|aspnetdb.mdf' could not be created.)
I took this to mean the the path isn't valid for publishing to, which makes sense. So I changed the destination path to the fully qualified path (C:WebAppsApp_Dataaspnetdb.mdf) and ran it again. This time I got the following error:
Web deployment task failed.(Cannot connect to the database 'C:WebAppsAppDataaspnetdb.mdr'.)
I looked at the security for the folder and everything seems fine. Now I'm stuck.
My question is - can anyone tell me what I'm doing wrong, or supply a list of steps to follow, or give me a link to a site that has clear steps as to how this is done?
I need to add a column name contact id in asp.net memebership table.I get the contact id from the contacts table and i need to pass that contact id in asp.net membership table when user creation event fires.
View 2 Repliesassume I have a multi layer application with the following logical separation between layer:
Presentation Layer
Service Layer
business Layer
Data access layer
I'd like to use a custom asp.net membership provider for authentication/authorization in my app. which is the best layer where to put the custom asp.net membership provider?
I am trying to build my own custom Membership Provider in an MVC 3 Web Application using C#.
Here is my code:
[Code]....
As you can see, I am just starting with it, and yet I've encountered problems. According to
this tutorial when I right click on MembershipProvider, I should get the option to [ Implement Abstract Class ], but I don't get that ! I am using Visual Studio 2010.
I have a small windows forms application that uses the membership provider that is defined in my app.config file. I want to get rid of my app.config file and initialize the membership provider completely from code. The reason behind this is because I want to be able to dynamically connect to different databases containing asp.net user tables and I want the user to be able to enter the desired database information into a text box at run time. Is this possible or is it required that I have an app.config file?
View 1 RepliesI've been asked to upgrade a few applications and I'm planning on merging all of them into one asp.net application. I'm fine with this decision and have spoken with fellow workers and they also think it's the best option to go with.
The application will be accessed from a small group of users which belong to a larger domain. I'm currently planning on using Windows authentication and only allow this small set of users to access the asp.net application. Also there must be some role management, so that only certain users can view certain functionality.
I really don't want to have many different windows groups; so I want to avoid having to assign different windows groups to different folders and control permissions in the web.config.
What I'd like to do is:
- Assign one windows group to the small group of users who will access the page.
- Create a custom membership provider and control the user who accesses the application. Depending on the user I will then assign his current set of roles.
- Add an application setting to the web.config, with the name of the current administrator, so if he logs in, he will be assigned all roles, and will be able to create and assign roles to other users.
I use Form Based Authentication in my siteIn my login page I have:
FormsAuthentication.SetAuthCookie(user.userName, true)
As mentioned in subject line I'm not able to configure role based website in IIS7. Please find details below.
Environment Details:-
.Net Framework: 3.5
Server: Windows 2008
Webserver: IIS7
Database: SQL Server 2008
Authentication Type: Form Based
Roles/Membership Provider: User defnied.
Problem:-
After setuped my website in iis7 while trying to Login in web page even I entered correct password it says Incorrect password in Login control.After long googling I suspecty that we need to add "Provider to trusted provider" to Authorized provider. I have gone http://www.iis.net/ConfigReference/system.webServer/management/trustedProviders/add but didn't works for me.
Can you anyone please help me in this.
I have running 3.5 application, an i want to use ajax for this application after enabling ajax everything workign fine but i have a problem with hiddent fields. As I have hidden field i set a value tru or false in it but he data is dublicated like (False, False) I donot know how, or from where this dublication is comming.
View 1 RepliesI'm going to ask a user to login first, then when I'm going to save information I'm going to have to save the information and associate it with the logged in user.How should I handle this with session?
View 4 RepliesI have an asp.net mvc 2 application with a SQL Server database accessed by the Entity Framework ORM. Now I found out I had used the wrong datatype for one of the fields in the database - int instead of double.
Now, this is not a big commercial application, but it is nevertheless already in use internally in my company. It works fine, but the users would need to be able to enter decimal values rather than just integers...
So my question is, can I change the type of the field after the fact so to speak, and not lose the data already entered? Of course I would have to change the references to this field in the model and everything that references it, but is it possible at all without losing the data?
I have a small db table that has a data field that is used throught my web application. What is the best way to carry this value from page to page with out calling the table everytime the page if refreshed or a new page requests the value?
I am using VS2010 .net framwork 3.5 SQL Server 2008 and utilizing LINQ for my queries.
Issue in UI form:1. when user press shift+tab key in numeric field then it's not working means cursor not moving.2. when user press shift+tab key in field wich is allowing any characters then it's working.
View 1 RepliesI would like to use the Role Membership and User Security database as my application database too. That is, just add the tables and relationships required by my application's data access layer to the Membership and Roles Database to save on hosting fees, (I have to pay extra for having two databases instead of one). Of course, the connection string would have to be adjusted, but I don't see a downside considering the application's database is actually an Access database. What can I say, it was a requirement at the time.
Basically, I would like to do the opposite of this:
http://forums.asp.net/p/1162485/1925262.aspx#1925262
This is my first membership provider; I converted the sample provider [URL] to SQL. I created a vb class provider and put it into the App_Code folder. After it was created I tried to modify my webconfig but the error pops up. I don't know what else to try, I don't know if I have missed something
webconfig:
[code]....