Change The Table Or Column Name Of Aspnet Membership?
Mar 26, 2010Can we change the table or column name of aspnet membership.If yes? then what will be the effects ?
View 1 RepliesCan we change the table or column name of aspnet membership.If yes? then what will be the effects ?
View 1 Replieshow to decrypt and encrypt password in table membership in aspnet databas ?
View 8 RepliesHow can I sync up the aspnet membership tables among 2 different databases?
View 1 Repliesi am trying to show a list of users of my application "school", when admin logs in then he can view all the users in list but when school principals logins, he should get only users of his school, So i thought to get the current loggedIn userId first and then by that userId i'll get schoolId since userId is foreign key in school table...once i'll get the schoolId i can show the members of that school.
But my problem is how to get the UserID of currently loggedIn. I'm using MVC 1.0 Asp.Net -- "Membership" if my logic above is wrong then tell me the alternate good idea, so that principal can see only his users list.
I have an asp.net site running on XP IIS just fine, with login using aspnetdb. However, I wrote a page that has a datasource that connects to the same db, with a gridview that displays users. I've done this before on 2003 server iis 6 no problem. Here I get,
Cannot open user default database. Login failed.Login failed for user (domainusername)This is the identity I set in IIS 6.0 under authentication methods for anonymous access. I had to do this because the site connects to a remote accessdb as well. I cant use a local account or aspnet account.I dont understand how I can use the same site to login and out, but not to access this page.This is my asp.net conection string
data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;user instance=true
The web config has this:
<
add
name="ASPNETDBConnectionString"
connectionString="Data
Source=.SQLEXPRESS;AttachDbFilename=C:InetpubwwwrootApp_DataASPNETDB.MDF;Integrated Security=True;Connect Timeout=30;User Instance=true"
providerName="System.Data.SqlClient"
/>
Thats what the data source uses.Go figure when I remove and add again integrated security true, I can see the page. WHY I DONT KNOW!!!! But I also call membership.deleteuser() with a delete button, NOW THIS FAILS!Cannot open user default database. Login failed.Login failed for user '(computername)ASPNET'.
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]....
I want to rename aspnet_application table and its columns. 1- Does membership framework allow me to do that ?2- Will there be any problem in accessing System.Web.Security functions ?3- I have to change procedures and functions etc ?
View 1 RepliesI 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 RepliesI am in the process of creating my database and I have the pending question of whether I should add a UserID using INT to the membership table. I am not replacing the UserID that is a UniqueIdentifier I am just adding a UserID with INT.
The reason I want to do this is because I have about twelve other tables that uses the UserID column. It will be easy for users to insert data into the other tables and I foresee the tables getting to be millions of rows, by using an UserID INT it will avoid the mass amount of storage from the UniqueIdentifier column.
Now my question is what are my repurcussions of doing this? I've already found out one, and I believe it is my biggest question, if I were to create an insert command in .net how would I grab the UserID INT rather then the UserID UniqueIdentifier to insert it into my tables? For example, I can get the userid this way:
Membership.GetUser("username").ProviderUserKey.ToString();
I am wondering what's the easiest way to go about doing this. I am using the user signup form control that comes with .net and they can create user through the application and once they do users see the "members area" of my site.
However, they are only trial members. using my paypal form, once they pay for service, they become a paid member.. so I want to keep track of this in the membership table by having a column in that table: bit registeredUser. Do I have to create my own overriden membership class for this, at first I thought there was already a column like this called isApproved, but seems thats for something else because if its set to false user cannot even login.
I'm currently trying to figure out enabling my users, once logged in, to change their email address that they have registered. As far as I can see it's only held in the aspnet_Membership table.
The code I have so far is as follows, but it doesn't seem to be doing anything. No errors either so I can't go down that route yet!
[Code]....
I can't work out what's going wrong
I have a .Net 3.5 web site with master pages. All aspx pages (derived from master pages) have a form name of 'aspnet'. I want to change the form name for each aspx pages for web analytics purposes. I have lot of custom jscript in the site. Is there any easy way to do this without breaking the existing functionality.
View 1 RepliesWhen I try to edit the Identity Specification from No to Yes there isn't a way to do so. No drop-down arrow or any way to edit the text. How can I change it so that I can actually change the value to 'Yes'?
View 2 RepliesI attempted to change a table columns data type and in the process caused a lot of issues. I had a date column in one of my tables and stupidly changed it from varchar to date. When I tried to run queries on it I keep getting the 'cant find column 3 error'. Now that tables structure is :
[Code]...
So column 4 is actually the date column. All other queries work for this table. I then tried to change it back and then copied all data to a new table and now I am using the new table and converting the dates as needed but I am still getting the error.
SELECT * FROM postlinks WHERE postlinks.date >= CONVERT(datetime,CONVERT(varchar(10),GetDate(),112))
I want to copy data from a table[tblExcel][No.of columns:2] to another table[ev_event] which has 5 columns, 2 columns from the another table, 3 columns from user defined value
[code].....
I am quite new to LINQ, and I am stuck with this probably basic problem, but haven't been able to find a solution, so I thought I could ask here.
So, I have this repository where I put my functions for data accessing, and now I need to write a function to get all the applicants that have applied for this particular advertisement, and their values too. Now, the values are stored in a separate M:N table, where every row consists of the applicantID,advertisementID and value. I just wanna append the value to every applicant that I show, so that it would look like a Ranking List.
However, I do not seem to know how to select just the name column from the Applicant table, and just the Value column from the ApplicantValue table.
And there's this Iqueryable interface that further confuses me...
Here's my function to get the Applicants only:
[Code]....
Now, if I try to add to the definition of the type two columns, it says that it only messes with types, i.e. one type should be passed. So I figured I would do a ViewModel and then pass it, like this
[Code]....
and then in the function I have no idea how to pass the values:
I am using item template and eval function in the gridview to display the records. Can I add a coulmn which is not in the table?
I have to add some columns which is not in the table and assign the values from code behind to that particular column
I'm currectly tryin to access a specific value in my database in a specific column. I'm tryin to use the primary key of the table to access the actual value in the row of that ID.
The current code:
[Code]....
Just iterates through the table and looking for any row with the boolean 'checkin' value is True, then it takes the 'id' value of that row and stores it into an array. Is there a way that I can access a another entry, and only that entry, in the table with the 'id' stored in the array?
Like if my data base contained and int, primarykey, `id` value, a boolean, `checkedin` value, and a `time` value, is there a way to access, lets say, the row with `id` equalling 3 and and the checkIn value from that row?
How to handle this error
"An explicit value for the identity column in table 'UserActivation' can only be specified when a column list is used and IDENTITY_INSERT is ON."
i have a table which showing the food data from my Model, including Name, Amount, Storage and Expiry Date. I wish to either:
1. Let user click on the column header and sort the column they want
2. Or default showing the food which almost expired on the top of the table
I am working on a web app for an online photo album. It is the last project in Scott Mitchell's book: "ASP.Net 2.0 in 24 hours".
I am creating a page where users can enter new photo images. The functionality for uploading an image will come later. I am working on just inserting a new row into the Pictures table with an optional category, a required title and a required description.
I am getting an error when I try to insert a new row.
Here is a screenshot of the page with a shot of the dropdown list.
The Categories are user-specific. I am getting the correct values retrieved.
[URL]
There are two pretty simple database tables involved here.
NOTE: The CategoryID and PIctureID are both autoincrement integer columns.
[URL]
The page uses a DetailsView that uses a SqlDataSource that uses the Pictures table. (The DetailsView's Default Mode property is set to "Insert". The "Enable Inserting" checkbox is also checked.)
The dropdown list uses a dropdown control that uses a SqlDataSource that uses the Categories table.
When the "Insert" button is clicked the CategoryID value associated with selected (Category) Name on the dropdown list will be used along with the Title and Description values to insert a row in to the Pictures table. (If no Category value is selected, then a null value will be used for the CategoryID. This is OK because the CategoryID column in the Pictures table allows nulls.)
My problem is that I am getting this error:
Cannot insert explicit value for identity column in table 'Pictures' when IDENTITY_INSERT is set to OFF.
(FYI: I have the full version of both Visual Studio and SQL Server.)
Here is my source code for the page:
[Code]....
i have 3 tables which are Table A(a Id,b Id),
Table B(b Id,a Id,c Id),
Table C(c Id,b Id)
How can i select Table C column by using table A?
In my master page I have:
MembershipUser thisUser = Membership.GetUser();
loggedInUserID = thisUser.ProviderUserKey.ToString();
thisUser gives me access to all the fields in aspnet_Membership. I want a new field, isSubscribed for each user. I can use an SQL query to fetch the value fine, but I want to know if there is someway to modify the membershipuser object so it retrieves this value as well, so it is accessible from:
thisUser.isSubscribed.ToString();
I want to create a temporary table where the columns of that temporary table needs to be dynamic (those columns needs to come from the rows of another table)
View 6 RepliesI have a gridview which is binded to a Sqldatasource. I would like to replace a column data field value to 'Not Applicable' if that column has got a value of 2 in database.
View 2 Replies