Darrel,
by frame i meant like a painting... it has a frame, just like a
painting, where is place a flash animation, some ads, and partners logos...
in the middle of it, is place the asp.net site itself...
the login runs a simple sql password/username comparisson...
the code is place below,...
i used frames, because i don't want it reloading every redirect..
tks,
christiano.
Code:
Dim cmdComando As New SqlCommand
Dim dtrAutentica As SqlDataReader
'DEFINIÇÃO DO TIPO DE COMANDO E CONEXÃO
cmdComando.CommandType = Data.CommandType.StoredProcedure
cmdComando.Connection = ConBanco
cmdComando.CommandText = "proc_SelAltenticaUsuario"
'PASSANDO OS PARÂMETROS PARA A PROC
Dim sLogin As SqlParameter = New SqlParameter("@sLogin",
Data.SqlDbType.VarChar, 30) 'Username param
sLogin.Value = txtLogin.Text
cmdComando.Parameters.Add(sLogin)
Dim sSenha As SqlParameter = New SqlParameter("@sSenha",
Data.SqlDbType.VarChar, 12) 'Password Param
sSenha.Value = txtSenha.Text
cmdComando.Parameters.Add(sSenha)
'ABRINDO A CONEXÃO JOGANDO O RETORNO DA PROC NO DATA READER
ConBanco.Open()
dtrAutentica = cmdComando.ExecuteReader()
If dtrAutentica.Read Then
'CASO TENHA ALGUM RETORNO, JOGA O RETORNO NA VARIAVEL DE SESSÃO
Session("UsuaCodi") = dtrAutentica.Item("UsuaCodi").ToString
Session("UsuaGrup") = dtrAutentica.Item("UsuaGrup").ToString
Session("GereCodi") = dtrAutentica.Item("GereCodi").ToString
Session("GereNome") = dtrAutentica.Item("GereNome").ToString
'AUTENTITICA O USUARIO VIA FORMS E REDIRECIONA PARA A PAGINA
FormsAuthentication.RedirectFromLoginPage(txtLogin.Text, False)
Else
'CASO NAO ENCONTRE O LOGIN O SEU ESTAO INCORRETO E EXIBE MENSAGEM
lblErro.Visible = True
End If
ConBanco.Close()
Web.conf:
<authentication mode="Forms">
<forms name="ESCOLTAONLINE" loginUrl="login.aspx" protection="All"
timeout="60"/>
</authentication>
<authorization >
<deny users="?"/>
</authorization>
</system.web>
<location path="Imagens">
<system.web>
<authorization>
<allow users="?"/>
</authorization >
</system.web>
</location>
<location path="jeff.css">
<system.web>
<authorization>
<allow users="?"/>
</authorization >
</system.web>
</location>
<location path="ESCOLTA ON LINE.pdf">
<system.web>
<authorization>
<allow users="*"/>
</authorization >
</system.web>
</location>