G
Guest
I've been trying to locate some property or method that will allow
programmatic access to the "loginUrl" attribute in the web.config file in the
<system.web> -> <authentication> element when the config file is set up for
Forms Authentication. I know certain system.web settings get mapped to
various properties/methods during runtime (e.g. <sessionState>'s timeout
attribute maps to the Session.Timeout property at runtime). You can easily
access the "name" and "path" attributes for FormsAuthentication via the
"FormsCookieName" and "FormsCookiePath" properties, but there is no
"LoginUrl" property. I've looked in several other places, but I can't find
anything that gives me access to that. The only way I've been able to
programmatically access that is to load the entire web.config file into an
XmlDocument and then use XPath to access that element/attribute. That
doesn't seem like a "clean" way to go about this and since so many other
web.config properties are available at runtime, I don't see why loginUrl
should not also be easily available. Any ideas?
Thanks!
-Mike
programmatic access to the "loginUrl" attribute in the web.config file in the
<system.web> -> <authentication> element when the config file is set up for
Forms Authentication. I know certain system.web settings get mapped to
various properties/methods during runtime (e.g. <sessionState>'s timeout
attribute maps to the Session.Timeout property at runtime). You can easily
access the "name" and "path" attributes for FormsAuthentication via the
"FormsCookieName" and "FormsCookiePath" properties, but there is no
"LoginUrl" property. I've looked in several other places, but I can't find
anything that gives me access to that. The only way I've been able to
programmatically access that is to load the entire web.config file into an
XmlDocument and then use XPath to access that element/attribute. That
doesn't seem like a "clean" way to go about this and since so many other
web.config properties are available at runtime, I don't see why loginUrl
should not also be easily available. Any ideas?
Thanks!
-Mike