not loggin in behind iframes...

  • Thread starter Thread starter Christiano Donke
  • Start date Start date
C

Christiano Donke

i know that asp.net cannot work with frames... that it recognizes the frame
as a single window...
so far... no problem..


i redesigned a site, giving it a frame with ads all around, and an iframe in
the middle with the login pages...

but now, when i click to login, the page flashes, but there is no login...
it keeps just like that...


have anyone ever seen this???


tks,
christiano.
 
i know that asp.net cannot work with frames... that it recognizes the
frame as a single window...

I don't think that's true.
i redesigned a site, giving it a frame with ads all around, and an iframe
in the middle with the login pages...

By 'frame' do you mean frameset?
but now, when i click to login, the page flashes, but there is no login...
it keeps just like that...

It's impossible to say without knowing what your login page is doing.

BUT...if you're building an asp.net site, why have frames at all? You can
generate the adds server side and just put them in the HTML page itself.

Frames should be avoided most of the time.

-Darrel
 
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>
 
Back
Top