I am trying to use FormsAuthenticationConfiguration to set my LoginUrl at runtime in my app. I am testing it as follows
GLOBAL.ASAX Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs)
' Set the LoginUrl.
Dim instance As New FormsAuthenticationConfiguration
instance.LoginUrl = "MyNewLogin.aspx"
End Sub
and then using
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim currentLoginUrl As String = FormsAuthentication.LoginUrl
Response.Write(currentLoginUrl)
End Sub
in my Default.aspx.vb page.
The problem is that it is writing out "login.aspx" on the page...
Does anyone know what I am doing wrong?
Chase

Visual Studio 2008
ASP.NET 3.5 (Visual Basic)
SQL Server Express
Check out my blog