وضعن في ملف web.config هذا الكود :
<authentication mode="Forms"> <forms loginUrl="Login.aspx" timeout="10" name="sss" > <credentials passwordFormat="Clear"> <user name="aaa" password="aaa" /> </credentials> </forms> </authentication> <authorization> <deny users="?"/> </authorization>
لكن المشكلة ان صفحة Login تظهر حتى في الصفحة الرئيسية للموقع Default.aspx مع اني لم أضع فيها :
If Session("Login") <> "" Then
Else
FormsAuthentication.RedirectToLoginPage("Login.aspx")
End If