asp.net 2.0 windows authentication

asp.net 2.0 windows authentication

am 01.04.2008 16:35:04 von NH

Hi,

I have to swtich my asp.net 2.0 apps from forms authentication to windows
authentication.

All the users in the database obviously have a userid and this userid was
stored into the "FormsAuthentication.SetAuthCookie" value when they logged
in. I needed this userid in the app later to store it against records they
created in the database etc.

Now if I use Windows Authentication the NT username is not the same as the
userid in the database. How can I handle this? Do I need to store the
mappings between the NT username and the userid in the database?

Thanks

RE: asp.net 2.0 windows authentication

am 01.04.2008 17:36:03 von brucebarker

you have serveral options

1) mapping table
2) custom provider that handles the mapping.
3) update the database to the new user names

-- bruce (sqlwork.com)


"NH" wrote:

> Hi,
>
> I have to swtich my asp.net 2.0 apps from forms authentication to windows
> authentication.
>
> All the users in the database obviously have a userid and this userid was
> stored into the "FormsAuthentication.SetAuthCookie" value when they logged
> in. I needed this userid in the app later to store it against records they
> created in the database etc.
>
> Now if I use Windows Authentication the NT username is not the same as the
> userid in the database. How can I handle this? Do I need to store the
> mappings between the NT username and the userid in the database?
>
> Thanks