Dimon, прошу Вашей помощи!!!
ссылка: http://test_site.russia.webmatrixhosting.net/adm/
имя - test
пароль - test
авторизация проходит только чере Netscape, Opera, FireFox
Через Internet Explorer работать отказывается!!!
вот код:
if user_login<>"" and user_password<>"" then
if fms.test_user(user_login, user_password) then
formsauthentication.setauthcookie(user_login, false)
response.redirect("/adm/")
end if
end if
функция test_user - проверяет наличие пользователя в базе
public function test_user(u_login, u_password)
dim r as boolean = false
sql = "SELECT id_user, user_access_level, user_login, user_password FROM users WHERE (user_login='" & u_login & "') AND (user_password='" & u_password & "')"
rdr = sql_select(sql)
if not rdr is nothing then
if rdr.hasrows then
if rdr.read() then
dim user_id as integer = rdr.getvalue(0)
dim user_access_level as integer = rdr.getvalue(1)
system.web.httpcontext.current.session.add("ual", user_access_level)
system.web.httpcontext.current.session.add("uid", user_id)
r = true
end if
rdr.close()
else
set_message("Извините, информация о пользовате не найдена.")
end if
else
set_message("Извините, не удалось получить данные из базы.")
end if
db_close(db_conn_1, db_cmd_1)
return r
end function
почему ТАК?
не устанавливаются не переменные сессии ни AuthCookie 
на двух (!) других хостингах все работает...
Как обойти? Отакзаться от Froms авторизации???
Последний раз редактировалось 28 January 2005 16:08
|