Author: felipemgonzales | Posted on: 3/4/2010 1:45:56 PM | Views : 418

Hi
I'm using this code to verify if the user that is in a key in my web.config exists.
if it exists he can se the page else he goes to another page.

the code is below
 
#Region "verify user credencials" Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender Dim admin As Boolean = False For n As Integer = 0 To ConfigurationManager.AppSettings("users").Split("|").Length If GetCurrentClientLogon() = ConfigurationManager.AppSettings("users").Split("|")(n) Then admin = True Exit For End If Next If admin = False Then Response.Redirect("Default.aspx") End If End Sub #End Region #Region "Methods" Public Function GetCurrentClientLogon() As String ...

Go to the complete details ...