How to add more user fields in aspnetdb database? - asp.net

I have created an ASPNETDB database on SQL Server 2008 for users, roles and profiles with Aspnet_regsql.exe.
But what I want to more user attributes apart from those default ones (name, email, mobile and comment), e.g. Postcode, Address, Telephone number, Rank, Position, etc. And also those new fields should be exposed to CreateNewUserWizard in the aspx page design mode, so that new user can be registered with more attributes.
I tried to add new columns in the "aspnet_Membership" table of ASPNETDB database. But they weren't automatically picked up.
Can anyone please give me some help on this? Thanks
Cheers,
Alex

Don't touch the database yourself. Follow the steps outlined here:
http://weblogs.asp.net/scottgu/archive/2005/10/18/427754.aspx
Note that you need to use the "Website" project template. Profiles are not supported out-of-the-box (without some customization) for the Web Application project template.

Please refer aspnet_Profile table
To add additional attributes columns you will need to create Profile Properties in web.config file and access this Properties and update the Profile of the currently created user.
If you have complex information about users then u can create your table and use the foreign key relation ship to UserId in aspnet_users table.
Check this MSDN ARTICLE
HOW TO ADD PROPERTIES for Profile
Complete details of using Profiles in Asp.net C# is explained in one of the answer on StackOverflow itself please refer how-to-assign-profile-values

Related

Is it possible to rename firebase database name?

We had created the multiple databases. Now, we need to rename the database that is used for testing purpose. So, Is it possible to rename check-12cc0-test database? Please check out the image below.
You can change your project name from here
I have it in Spanish, but at the right of project overview, project configuration you should see the pencil to edit your project name.
Note you can't change your database name since it's the ID of the project, you will need to create a new one and delete the one you have to change the database name. You can only change your children and keys inside your database main tree node.
Since the id of the project can't change, this is what Firebase tells to us about it:
ID of the project
It is the unique identifier of your Firebase project. You can find it in the project URL: https://console.firebase.google.com/project/<projectId>
Remember that for edit the nodes and keys you can't do it directly from Firebase, instead you should export your JSON Database and edit it, then reupload it, or do it programmatically.

How to manage access permission in alfresco

Hello Everyone thank's in advance for your help.
I am trying to configure access permission in alfresco and now stuck in a scenario
It would be great help if someone defines proper way to achieve this functionality
now my problem is
I want to create a site (which will be accessible by all user)
then will create folder and sub folder in that site (i am ready to customize content type of those folder if required)
now i want to configure alfresco in such a way that specific set of user can access specific folder and it's content
for example
This is list of user
user1,user2,user3,user4,user5
And this is folder structure
Project
Data
Test
Exam
Design
art
practice
Work
W1
W2
Now how to configure it in such a way that
user1 can access Data->Exam
user2 can access work and all it's child folder
user3 can access Data and all it's child folder
user4 can access Design and all it's child folder and
user5 can access Data->Work, Design->art,Work->W1 folder
Note that i am using CMIS api to generate this folder structure
so is there any way to achieve this by java code only ?
i have read about managing permission but not sure about using it just because when i have tried to provide permission to folder it allow to add only single user
but in my case i want to make group of user and want to make the folder accessible by that particulate group.
Thank you so much for you time :)
If you want to use a group, you'll need to create the group in Alfresco using either the admin console or the Alfresco API. CMIS cannot manage users or groups.
Once your users and groups are in place, you can use CMIS to assign them to ACLs. However, the challenge is that you may need to disable or "break" ACL inheritance to do exactly what you want. You cannot disable ACL inheritance with the CMIS API. You'll have to do it in the UI or through the Alfresco API.
With your users and groups in place and with your folders configured to inherit or not inherit parent permissions as needed, you can now add users and groups to your folders. With CMIS, you can add as many users or groups as you need to a given folder. It is not limited to a single user or group. This page has some examples on using Access Control Entries (ACEs) which make up Access Control Lists (ACLs).
I think that Jeff Potts answer is great i will only add few thing's you can look to this post it will give you an answer how to work with ACL How to get Acls of a document.
You can also use the allowable action in any Folder (or document) it will look like this :
Action a = Action.CAN_DELETE_OBJECT;
object = session.getObjectByPath(idObject); // In case it's a folder
if (object.getAllowableActions().getAllowableActions().contains(a)) {
return Boolean.TRUE;// You can do it
}
Only remember that you can get the allowable action from String (In case you want work with few of them)
String canCreateFolder= Action.CAN_CREATE_FOLDER.value();
the most importante Action that you have to use :
can_create_folder = Action.CAN_CREATE_FOLDER.value();
can_create_document = Action.CAN_CREATE_DOCUMENT.value();
can_update_folder = Action.CAN_UPDATE_PROPERTIES.value();
can_update_document = Action.CAN_UPDATE_PROPERTIES.value();
can_delete_folder = Action.CAN_DELETE_OBJECT.value();
can_delete_document = Action.CAN_DELETE_OBJECT.value();
Hope that helped you.

Where exactly does Membership.CreateUser Method add the new user to?

So I created my first ASP.NET MVC 3 internet application which comes with the built in functionality of registering/logging in.
I tried to explore where exactly is the database the application interacts with.In the corresponding controller/action method I see a call to Membership.CreateUser with these parameters.To which MSDN link says it adds these values to the data store.My question is to which table of what database it adds these values?(so that I can see the updates)
Using default setting, your data is saved in in its default database ASPNETDB.MDF. Click Show all files in the Solution explorer then click App_Data. You should see ASPNETDB.MDF. Double click it then a database will appear to you in the Server Expolorer. On the ASPNETDB.MDF click Tables and find aspnet_Users.
Hope this helps. :)
Assuming all the above is true (haven't change the default setup, connection string etc.) then look for tables called aspnet_users, aspnet_membership and a few others prefixed with aspnet_ . that's where to look.
If you didn't change anything, go to web.config and find DefaultConnectionString. Thats where the data inserted and the table name is UserProfiles.
it creates a db file in App_Data folder.
If you use default settings then the Database Name where the Table will be installed is: aspnetdb. Also the table names are self explanatory as seen in below image. e.g. for MemberShip the table used is: dbo.aspnet_Membership.
The tool used to install these tables is aspnet_regsql.exe, and you can easily call it from
within a Visual Studio Command Prompt window

webmatrix login information starter site (ASP.net)

I just created a new Starter site on webmatrix using ASP.net, with the built in template.
I am wondering where the site stores all the password information? I understand WebSecurity is a built-in model, but I want to know where all these object information are being stored. The only columns in the user database table are "email" and "id".
Don't you have tables named 'webpages_...'? I think webpages_Membership is the one you are looking for.
#cesarse is correct about the table webPages_Membership. Take a look in your web.config file and look for the connection string, which will let you know which database your data is being saved in.

Invalid object name 'umbracoDomains'

I uploaded all the files of Umbraco CMS to the my http://blog.domain.com and also modified the web.config file. When I point to blog.domain.com, it is giving an error written in the subject. The hosting type for the subdomain is physical hosting not subdomain on subfolder
So, I have a second web.config file in this subdomain. The first one is in the main domain. I hoep this doesnt make a differnce.
Here's the screenshot: http://i.stack.imgur.com/PxSqq.jpg
I checked the database user with which I am trying to login in to the DB and it has the db_owner permissions for the database.
Also, I tried googling for the similar issues to see if someone with similar error had resolved the problem. Here are some pages but I haven't been able to find a solution.
Please help! This has been pending for long! :-(
When the Umbraco database is created, a new schema is created and all tables are created under this schema (eg. . rather than dbo.).
As the Umbraco website / db are copied, I assume that you changed the credentials, meaning the Umbraco data access layer may be trying to find tables ..
I have found that changing the schema to dbo resolves this problem and can be achieved (as long as only the Umbraco tables for you website are contained in the database) with the following SQL script:
exec sp_MSforeachtable 'ALTER SCHEMA dbo TRANSFER ?'
For more details, I have recently written an article on copying an Umbraco Website found at the following URL:
http://www.carbonsoft.co.uk/articles/2012/06/copying-an-umbraco-instance.aspx
Although this question was asked some time ago, I hope this helps others with similar problems,
You also get this error if you have no database in your connection string.
Umbraco's datalayer is (unfortunately) case-sensitive - which means that Umbraco can't find the table umbracoDomains. Check that the table is correctly named and/or cased - if your database is case-insensitive then make sure that all your tables are lowercased, as this should work.
carbonrb is right, when umbraco installation creates db it uses default credentials for db user. You can change schema to dbo like carbonrb advice or create user who has default schema the same as installed by umbraco. User cannot be in sysadmin role because it will override default schema back to dbo.

Resources