Re: Business layer wrapping user information and transactions?





<<What he said>>

I'd strongly recommend (with emphasis on the strongly) not trying to keep
"sync" data.

Using the Provider Model, you can create your ~own
MyCustomMembershipProvider : MembershipProvider

This will allow you to use your custom tables, and such.

There's no reason why you can't use your MyCustomMembershipProvider from a
Winforms.
You'll just lose the "drag and drop" ability that you have in asp.net 2.0.

See
http://www.15seconds.com/issue/050216.htm

"Peter Bradley" <pbradley@xxxxxxxxxx> wrote in message
news:OQ0UonvOHHA.4172@xxxxxxxxxxxxxxxxxxxxxxx
One of the golden rules of software development is never, ever to hold the
same data in more than one place. It's a maintenance nightmare.

Is there no way you can get both front ends to use the same data?


Petere

"Mark Baldwin" <sWozzi3@xxxxxxxxxxxxxxxx> wrote in message
news:uHC$givOHHA.324@xxxxxxxxxxxxxxxxxxxxxxx
I have an application with both Windows Forms and ASP.NET front ends and
uses both integrated web security and a security database. The problem I
have is that I need to syncronize these security databases.

The web front end uses ASP membership with the SQL provider, the
database
is moved to the SQL Server instead of the SQL Express datafile.

The Windows Forms app uses tables such as "users" within the database.

If I add a user on the website, I need also to add a user to the
database
"users" table.

To achieve this I write a business layer component that wraps both the
security data tables and the ASP.NET membership functions. So for
instance, to delete a user...

[DataObjectMethod(DataObjectMethodType.Delete, true)]
static public void Delete(string UserName)
{
// delete user from internal database table "users"
usersTableAdapter UserTableAdapter = new usersTableAdapter();
int rowsAffected = UserTableAdapter.DeleteByName(UserName);

// delete user from ASP.NET membership database
Membership.DeleteUser(UserName, true);
}

The question is how do I get these two functions into a transaction so
that if the deletion for the ASP.NET member fails, the delete on the
internal database table is rolled back?

--
Best regards
Mark





.



Relevant Pages

  • Re: Business layer wrapping user information and transactions?
    ... uses both integrated web security and a security database. ... The web front end uses ASP membership with the SQL provider, ... The Windows Forms app uses tables such as "users" within the database. ... security data tables and the ASP.NET membership functions. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Replacing VS .NETs SQL Server Express Edition Integration
    ... As you said you already have an existing database that contains the ... membership structure, ... Replacing VS .NET's SQL Server Express Edition Integration ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Seen the Survey?
    ... paper appointment records and census returns for leaders ... I'm looking at it in many ways from someone that knows such a database ... Membership Database that I perceive no real use for nor need for. ... The task is to work with kids and get them active, ...
    (uk.rec.scouting)
  • Re: Need to load 200 users into Form security DB
    ... membership provider" if you want to see what that entails. ... My situation is that I had a development database with some users/roles ... security database in SQL2008 with 11 tables, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: What do you think about......?
    ... just posting a message on one of the Yahoo groups I moderate and I ... One thing I thought of was putting the Directory in a database. ... it could be accessed by anyone with membership to the group. ... I'm not sure if you can limit access to a feature of a group while all ...
    (rec.crafts.textiles.quilting)