M
Martin
Dear fellow ASP.NET programmer,
I stared using forms authentication and temporarily used a <credentials> tag
in web.config. After I got it working I realized this wasn't really
practical. I cannot write to web.config so I cannot dynamically update the
credentials while the site is up. Since the
FormsAuthentication.Authenticate() method's documentations claims the
following:
"Attempts to validate the credentials against those contained in the
configured credential store, given the supplied credentials."
I figured it wouldn't be too hard to by-pass the retrieval of credentials to
some other source and that it could probably be done declaratively in
web.config. Well I still hope this is the case but I cannot find anything
about it anywhere except a couple more references that state that it is very
easy to do so. If anyone actually knows how I sure would like to know.
I have my own xml fle with credentials now. My problem is that, since I am
authenticating myself and do not use
FormsAuthentication.Authenticate() anymore, the user name is no longer
available from the read-only property httpContext.Current.User.Identity.Name
which was pretty nice. I can of course store my user name in some session
variable but this doesn't seem right, I want to do this properly.
I am also confused about the authentication cookie. Is it in any way related
to the session cookie or are sessions and authentication sessions separate,
independent animals?
Martin.
I stared using forms authentication and temporarily used a <credentials> tag
in web.config. After I got it working I realized this wasn't really
practical. I cannot write to web.config so I cannot dynamically update the
credentials while the site is up. Since the
FormsAuthentication.Authenticate() method's documentations claims the
following:
"Attempts to validate the credentials against those contained in the
configured credential store, given the supplied credentials."
I figured it wouldn't be too hard to by-pass the retrieval of credentials to
some other source and that it could probably be done declaratively in
web.config. Well I still hope this is the case but I cannot find anything
about it anywhere except a couple more references that state that it is very
easy to do so. If anyone actually knows how I sure would like to know.
I have my own xml fle with credentials now. My problem is that, since I am
authenticating myself and do not use
FormsAuthentication.Authenticate() anymore, the user name is no longer
available from the read-only property httpContext.Current.User.Identity.Name
which was pretty nice. I can of course store my user name in some session
variable but this doesn't seem right, I want to do this properly.
I am also confused about the authentication cookie. Is it in any way related
to the session cookie or are sessions and authentication sessions separate,
independent animals?
Martin.