I found a way to kludge the timeout value out, but can't
get the LogInURL.
Private Function TimeOut_Get() As Integer
'Get formsauthentication TimeOut value
'Kludge, timeout property is not exposed in the class
FormsAuthentication.SetAuthCookie("Username",
False)
Dim ticket As FormsAuthenticationTicket =
FormsAuthentication.Decrypt(Response.Cookies
(FormsAuthentication.FormsCookieName).Value)
Dim ts As New TimeSpan(ticket.Expiration.Ticks -
ticket.IssueDate.Ticks)
Return ts.Minutes
End Function
string path = "root\\NetFrameworkV1:forms";
ManagementObject pm = new ManagementClass(path).CreateInstance();
pm["Selector"] = "config://localhost"; // represents the machine.config
file
pm.Get();
Response.Output.WriteLine("LoginUrl = {0}<br>", pm["loginUrl"]);
When you want to access an XML file directly, use the file selector
(selector ="file://<filename>'), however, for machine.config, it's
recommended to use the config://localhost instead.
HTH,
-Allen
Disclaimer:
This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com
--------------------
Content-Class: urn:content-classes:message
From: "chuck" <nos...@crlf.com>
Sender: "chuck" <nos...@crlf.com>
X-Tomcat-NG: microsoft.public.dotnet.framework
Willy.
"chuck" <nos...@crlf.com> wrote in message news:1daa01c1e4ad$992c58a0$9de62ecf@tkmsftngxs01...
Willy.
"Willy Denoyette [MVP]" <willy.d...@pandora.be> wrote in message news:e8tSmTL5BHA.972@tkmsftngp05...