Security :: Practice To Maintain A Separate Usert Table And Add Fields To The Aspnet_Users Table?
Apr 14, 2010
If I am going to use the asp.net membership and roles, the asp.net database includes an aspnet_Users table that has the userid and email address. If I have custom fields is it best practice to maintain a separate usert table and link on user id or to add fields to the aspnet_Users table?
View 1 Replies
Similar Messages:
Oct 26, 2010
I created a project using asp.net in visual studio 2008. In my login database table aspnet_users I noticed under the column UserName there is some usernames that I didn't create such as '668215da-b4d0-4e50-8c97-06586afc07b1' All my usernames are less than 8 characters that are generated by users. How and why was the username '668215da-b4d0-4e50-8c97-06586afc07b1' created? When I query the database table aspnet_users to approve a new user I am not interested in usernames such as '668215da-b4d0-4e50-8c97-06586afc07b1'. How do I avoid them in my query?c = squareroot(e/m)
View 3 Replies
Jun 7, 2010
I want to know that is that the value of last activity date in aspnet_users table is changed when user is logoff from the application.
View 3 Replies
Aug 8, 2010
i am using aspnetdb database and i am using createuserwizard control and i have found that i am able to create user account with same username. as far as i know i think usernames are stored uniquly but i can't figured it out why i am able to create user account with duplicate user names.
View 6 Replies
Oct 13, 2010
I'm using SqlMembershipProvider and SqlRoleProvider for user management.
Users are created by
Dim MCS As System.Web.Security.MembershipCreateStatus
Dim NewUser
As MembershipUser = Membership.CreateUser(TB_UserName.Text, TB_Pw.Text, TB_Email.Text, TB_SecQuestion.Text, TB_SecAnswer.Text,
False, MCS)
later, after email confirmation, I take the user into a specified role
Dim myUser As System.Web.Security.MembershipUser = Nothing
myUser = Membership.GetUser(New Guid(Request("RegID")))Catch
If myUser
IsNot
Nothing
Then
myUser.Comment += " approved "
Membership.UpdateUser(myUser)
Roles.AddUserToRole(myUser.UserName, "role")
End if
After this I have two entries with the same UserName in aspnet_Users table, but with different UserId's. One UserId is referenced in aspnet_Membership table and the other in the aspnet_UsersInRoles table.
View 2 Replies
Aug 10, 2010
Perhaps this is a simpler VS9 question, but I want to link a SQLServer table with additional user data to the standard SQLServer membership table using the GUID userID as a foreign key. I go into design mode of my table, right-click on relationships, and click add in the dialog. but the left hand column shows me only the tables in my database. How do I get it to show the tables in the ASPNETDB.MDF database? I went through the tutorial (http://www.asp.net/learn/security/tutorial-08-cs.aspx), but it seems to magically appear in there without explanation.
View 3 Replies
Aug 31, 2010
For my existing data, both RoleName and LoweredRoleName are same, but some are lower case and some are in same case too.
View 3 Replies
Mar 9, 2010
I am wondering if the aspnet_Users table is always sorted (by UserName) even if I add new users which are alphabetically between two already existing users.
I've noticed that the method Membership.GetAllUsers() always seems to return a sorted collection of MembershipUsers.
Also when I look into SQL Server Management Studio and run a simple SQL query without ORDERBY clause...
SELECT [UserName]
FROM [MyDb].[dbo].[aspnet_Users]
...I get always a sorted result list.
I'm still very unfamiliar with SQL Server but I expected that when I add a new row to a table it is (physically) appended to the end of the table. And when I run a select statement without ORDERBY the rows will be selected in the order they were initially inserted into the database (so without any specific sort order).
I am wrong I guess. But how does it really work? Is it perhaps something special with the aspnet_Users table?
I am happy that the MemberShipUserCollection returned by GetAllUsers() is sorted but is it always guaranteed?
Update
I've just noticed that the database contains a stored procedure called aspnet_Membership_GetAllUsers. This procedure actually contains an ORDER BY clause by UserName. So if this stored procedure is indeed always called when I use Membership.GetAllUsers() in my code (at least if I am using the SqlMembershipProvider) it explains why the collection returned by Membership.GetAllUsers() is sorted by UserName.
Remains the question: Is Membership.GetAllUsers() actually based on this stored procedure?
View 3 Replies
Jul 18, 2010
I added extra fields into web config like this :
<profile enabled="true">
<properties/>
<add name="FirstName" type="string"/>
<add name="LastName" type="string"/>
<add name ="HomeAddress" type="string"/>
<properties/>
View 2 Replies
Apr 23, 2010
I am trying to use a second (custom) table to extend my users profile info. This table is in the same database as the 'aspnet_Users' table but has a different name. I create a FK relationship between the 'aspnet_Users' table and my custom table. Here is my web.config code:
<profile defaultProvider="AspNetSqlMembershipProvider">
<providers>
<clear />
<add name="AspNetSqlMembershipProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="ConString_SQLConnectionString"
applicationName="/" />
<add name="MyCustomProfile"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="ConString_SQLConnectionString"
applicationName="/"
table="MyProfileTable_Employees" />
</providers>
<properties>
<group name ="MyProfileInfo">
<add name="FirstName" type="string" defaultValue="[null]" customProviderData="FirstName;nvarchar" provider="MyCustomProfile" />
<add name="LastName" type="string" defaultValue="[null]" customProviderData="LastName;nvarchar" provider="MyCustomProfile" />
<add name="EmployeeNumber" type="int" defaultValue="[null]" customProviderData="EmployeeNumber;int" provider="MyCustomProfile" />
</group>
</properties>
</profile>
I have the table "MyProfileTable_Employees" poplulated with data the 'userid' matches to the aspnet_Users table. In my web application (vb), when I type in Profile.MyProfileInfo, there are no custom fields. Actually, when I type profile., there are no profile related entries. What am I missing here? Am I miss-interpting what a custom profile provider is?
View 2 Replies
Feb 19, 2011
vs2010 (express)
.net 4.0
SQL 2008 (express)
MVC 3
C#
Entity Framework
I'm curious as to whether there is a well known way to add a column to a SQL table as a global change in MVC 3.
"Global change" referring to adding a column from database to UI... can someone please outline the fundamental steps.
(i.e., 1. add column in SQL table. 2. update .edmx (replace relative tables) 3. ...)
View 4 Replies
Oct 26, 2010
I want to track equipment between three types of allocations. A piece of equipment can be allocated to an employee, to a customer facility or to a warehouse.
I have an equipment table, employee table, a customer table and warehouse table. Warehouse is where equipment is temporarily held and shared between multiple employees, it is a holding area.
Obviously each equipment item can only be allocated to one employee, customer or warehouse.
My original thinking was to make a table for EquipmentAllocations where it linked the EquipmentID and the id of the employee, customer or warehouse (all guids).
Eventually I will need to query the equipment to see where it is located/allocated. I will also need to query the employees to check what equipment is allocated to them.
I am trying to figure out the best way to handle this and I am looking for some guidance. I am sure many of you have had situations similar to this that you could draw upon to offer up some advice.
View 8 Replies
Mar 24, 2011
I have two tables:
[code]....
As you can see I have also added this column:
asp:BoundField DataField = 'Bind("Users.FirstName")'
View 2 Replies
Feb 5, 2010
I have applied audit trail to my webform/table its working fine.I am able to maintain the History(action,action_date) of the MySql database table from ASP.net but I want to save user name i.e action_by too so i will have history of who changed the data and when, how can i acheive to save username in history table.i have login webform in my application. History MySql Table.
View 1 Replies
Nov 19, 2010
I am retrieving a column from a table using an SqlDataSource in ASP.NET/C#, which contains multiple 'values' separated by commas. I'd like to be able to separate this values into multiple columns in my GridView, and also allow them to update them. Is this easy to accomplish?
View 1 Replies
Oct 3, 2010
I have multiple tables that are all linked back to a central table with foreign keys. I want to be able to create a new record in table 2, but I'm having trouble because I don't know how to create a new instance of table 2's record while referencing the ID of the record it will be tied to.
EXAMPLE:
Database: Collection
Table: Collection Field 1: id Field 2: name
Table: Book Field 1: collectionId Field 2: id Field 3: name
Now, I don't want to be able to create a book without setting it's collectionID, but I can't figure out how this should be divided in the controllers/views.
Should Book have a controller separate from Collection, or should the Collection controller have a createBook method, separate from it's own create method?
I want to call the createBook method (from it's own controller, or the Collection controller) from the Collection Details view.
When I invoke the create method of Book, how do I create a new Book that is instantiated with the collectionId set from the details view of the Collection item that was listed in the details view?
I should point out, I'm using the entity framework for my model, and I'm definitely new to this.
View 2 Replies
Jan 20, 2011
I am modified CreateUserWizard Template to accept additional user information such as address, city, state and zip. I wanna store this additional data into a table i create call UserInformation. The table has UserId as it's primary key and it's also a foregin key to apsnet_Users. The tables also has an Address, city, state and zip column/field. I have an event that is called after a new User is Created and it is at this point where i wanna write the Address, City, State and Zip to the the database. What is the best way to write the data to the database..
[Code]....
View 1 Replies
Sep 28, 2010
I am working on a multi-lingual application Assume the following:
Database has 50 tables and application has to support 5 languages
Which is the best way to design the database:
1. Include a langugae column for each table. Repeat the values for each language. Say i have a country table which has 100 countries in it. Then my design will contain 500 rows (100 for each langugae)
2. Create a separate table which will contain the translations for all the 50 tables in with a foreign key to the parent table.
Which is more efficient out of the above two.
View 3 Replies
Nov 11, 2013
I have made a call logging application in which i have authorised a normal user to edit update and delete from the gridview.But i want to give the admin person rights to see all the complaints deleted updated edited..i have thought a lot but all in vain havent found.
View 1 Replies
Dec 10, 2010
my main intention is that, the exsisting table of sql server database(.dbo) with 1000's of records, that should be import to a new access database table(.mdb).for example if we want to had a new table in db2, of exsisting table in db1 with some conditions by using "select * into New_Tabel from (select * from Exsisting_Table where <Condition>) as objectName". Here the new table is created and records inserted in one execution in db2. The same work should be done for access(sqlserver db --> Access db).Here the new access database table with given name (as string_sysdate) must be created dynamically by clicking a button (multiples time creating new table).Is there any query or c# code for sql server database to access database.
View 2 Replies
Nov 22, 2010
I have asp.net Forms View.
I have three textboxes to lookup three different product codes from a product lookup table.
When you enter search criteria in a Textbox it would popup listbox control with Products and
when user selects the product it populates product-id back in to textbox.
I have lookup table and listbox working. However, My problem is I can't figure out how to pupulate TextBox2 if search Criteria was typed into TextBox2and to populate TextBox 3 if the search criteria was typed into textbox 3 etc.
View 5 Replies
Jan 13, 2010
how can i use html to create table(<table></table>) in code behind c#?
View 18 Replies
Feb 9, 2011
I do not know if this can be done but lets say have a model like the one below:
I am trying to do this:
<%= Html.RadioButtonFor(model => model.B.height)%> -----> Does not work. Height is not a property
But B is a collection. How do I get access to the fields in table B in the View?
***********************************************************
Table A
Qid
name
age
Table B
Wid
Qid
gender
height
View 14 Replies
Sep 20, 2010
I currently have a submit page that captures data and submits to a SQL Table (see code). What I need to do is amend so that certain fields submit to a PDF file which the user can then view, download or print and for all the fields to populate the SQL table as normal.
[Code]....
[Code]....
View 1 Replies
Dec 31, 2010
I am trying to add new fields in membership table by using createuserwizrad control. is it possible to do that?
View 3 Replies