ASP.NET Dynamic Data? Real world user admin application - asp.net

I need to develop a user admin application.
My schema looks like the following:
See full size
As you can see I've got my own version of the user table and profile tables to store my data with a one-to-one mapping with aspnet membership tables.
I'm interested in using ASP.NET dynamics to speed up the proccess of creating an admin system.
I would like to create a customised listing with a search and a data grid listing with just basic details such as name and state information, date registered and then when you click to edit your presented with the domain representation of the data and not the exact undelying data.
Has anyone any experiece in doing this or building a real work application with Dynamic data?
Any tip suggestion, alternative etc..
Thanks

Has anyone any experience in doing this or building a real work application with Dynamic data?
Yes I have several systems that use a Hybryd of DD anf Membership to manage users.

Related

Moving an asp.net application to membership model

I have used asp.net so far to create personal web applications, for example, an application where I maintain to-do tasks in an MS SQL Server database or a customer management and support system. I use the basic authentication via web.config where I can create another user who can look and work with such a database, but then all the data is shared between him and me.
But now I want to convert this application into a membership model where a user signs up and will get to use his own personal list of to-do tasks. I can think of the following approach. Please correct me if I'm wrong on some point or if I have missed something.
Steps:
Add a membership user table and use the primary key of this table to access other tables where I will need to add this column, the to-do list in this case.
Next, I will need to write the Login, Signup and User management logic to maintain the user table. Here, I was hoping to find some working samples but all searches give me only ASP.NET MVC membership samples. I don't want to use MVC because I am using third-party asp.net components. As far as I know I can not use MVC with those components. Any links to ready made samples similar to MVC but for asp.net?
I also want the users to be able to login with their google id, dropbox id, etc. Is this possible while having my own login/signup? How does user table change then? Is the Email Address the only data to link up all these things? For example, if someone logs in with google id, I authenticate using Google oauth 2 API but use the email address as the data to add or locate that user to give him his data tables. I'm confused on how this kind of user table looks where all kinds of logins are possible along with a custom one. Any ideas?
http://www.shiningstar.net/ASPNet_Articles/SqlMembershipProvider.aspx
This should help talk you through what you need to do.
I got the exact solution that combines membership with oauth and is built into ASP.NET 4.5. What is more, there is a video that demos it all!
http://www.asp.net/vnext/overview/aspnet/oauth-in-the-default-aspnet-45-templates

How do people deal with asp.net membership/role/profile in real website?

I don't like asp.net profile provider store all profile info in one or two row in the database, but I want to use membership/profile API for authentication purpose.
Customize membership/role/profile provider requires big big upfront efforts, which may cause more mess later.
So how do people deal with that normally?
You don't have to use asp.net profiles to store additional information if you don't want to. Instead you can store it in a separate table and link it to aspnet_Users table like shown here: Storing additional information
You can use the built-in
SqlMembershipProvider, which is
installed by running
aspnet_regsql.exe.
You do not have to use profiles if
you don't like them.
Customizing membership/role/profile
providers is really not that big of
a deal.

suggestions for Membership in ASP.NET MVC application

With this question I am mostly looking for answers from people that have implemented the out-of-the-box ASP.NET membership in their own database - I've set up the tables inside my database and as far as I can see they contain mostly what I need but not everything. I will have the notion of a Firm (Company) to which Users will belong so I will have to associate the aspnet_Users with my Firms table (each user will be a member of exactly one firm).
If possible, provide some guidelines how did you do it and what I might run into if I have to modify the table design at some point in the future. Preferably I will be using the default Membership provider.
I am having trouble to decide whether to go from scratch or use what ASP.NET already offers.
I would suggest that you need to use a table-based Profile Provider implementation such as this one that Scott Guthrie blogged about. It is much better than the out-of-the-box profile provider as it allows you to define your own tables for profile information. In your case you would have a table that contains a Row per user and a FirmId and anything else you like such as nick name, social security number, whatever.
It works with the default Membership provider so you won't have to make any changes to it. There are two implementations in the example, a Stored Procedure based one and a Table based one. I prefer the second but they are both very easy to use.
The default profile provider proved a bit rubbish because it stored all of a user's information in a single field. The provider that I suggested solves this in a very efficient way.
I decided not to use ASP.NET Membership provider and its default tables because of the changes that might be introduced in future versions, so I eventually ended up using this custom Entity Framework provider by OmidID although I had to tweak it quite a lot. But I can now say that we have a rather fullproof entity framework based membership provider that we can easily maintain and indenpendent of the ASP.NET membership tables in SQL Server.
I would treat the ASP.NET membership as a separate service. Just use it as is and add any additional functionality on top of it.
In this case just create a table which links the users to the companies but don't alter the ASP.NET tables. If you have any additional information you need to store about users put this in another table which is associated with the ASP.NET membership users table.
Update: I've started using this ASP.NET MVC Area to administer users and roles https://github.com/TroyGoode/MembershipStarterKit. It comes with all the necessary models, views and controllers and is fully unit tested. Didn't take more than an hour to get it integrated into my site and up and running.

How do I store user input in a database?

I'm a newbie at this, so please be nice to me =^)
I'm creating a website with ASP.net and I have a sign up page. The user has to enter a name and password in textboxex, and choose a location and reason for joining from dropdown lists. (There is a built in wizard for new user sign-up but I chose not to use it).
I would like to save the information entered in a table in a database in the App_Data folder. How do I do this?
You will also need to learn ADO.NET which is the database access technology of choice for .Net.
Here's a basic tutorial to get you started...
Also Googling for asp.net ado.net tutorial will bring up good hits.
If you're creating a public-facing website, you need to put some serious thought into how you process, store, and retrieve user information. ASP.NET provides a lot of good functionality for this type of thing using the Membership class. You'll find this class in the System.Web.Security namespace.
You can also use the aspnet_regsql.exe application to generate the tables and stored procedures necessary to store this information correctly (i.e. storing hashed values for passwords and secret questions/answers, etc.)
As mentioned previously, many good tutorials (both written and video) can be found on these topics on the ASP.NET site as well as on MSDN.
As the godfather of ASP.NET, Scott Guthrie, might say: "Hope this helps."
You need to:
1) Have a schema representing the database and create it on the machine
2) Have an ability to execute queries against the data
3) Write a query to insert the user data into the database.
I'm sure google has a ton of ASP tutorials.

How do I use custom member properties for people on my .NET website

I am trying to make an asp.net website using Visual web dev and C# that accesses data in an SQL database. For my site, I need to be able to save and access additional user properties such as age and gender. I have been playing around with the built in .NET Login tools but I don't understand how to keep track of the additional properties (age, gender...) I could store all the users information in my own database but how do I correlate the users data in my DB to the usernames in the member database that is automatically created?
Probably profiles are perfect and quite easy to use for your purpose. ASP.NET manages the relation between users and their associated profile data (which you can customize for your needs) quite comfortable. Here is short introduction video:
http://www.asp.net/learn/videos/video-44.aspx
Are you using an ASP.NET website project or web application project? The video (and most information in MSDN) is related to website projects. For web applications there are some complications to take into account when you use profiles.
(Some hints if you are using a web application project:
How to assign Profile values?
If you are using an website project you can ignore this)
As Slauma said ASP.Net Profiles is a great way to do this using the Membership API.
But I don't like the way profiles use delimited list serialized in the database, and I've heard reports of speed issues under heavy load.
I Use Membership API on just about all applications, except for the profile bit.
To store user profiles, you can create a separate table. Maybe called 'UserProfile'. Add a column with a unique index for 'username' and/or 'email'. Which ever you treat as the user's username. Now you can use that column to pull profile information at runtime.
As a bonus, if you use an ORM like Entity framework, you can now write simple LINQ queries to pull your user information.

Resources