hi friends i want to open a login page first even for accessing any other pages in the application.
my code in web.config:
<authentication mode="Forms">
<forms loginUrl="~/Pages/login.aspx" defaultUrl ="~/Pages/default2.aspx" protection ="Validation" timeout="30"/>
</authentication>
<authorization>
<deny users ="?"/>
</authorization>
<location path ="~/Pages/default2.aspx">
<system.web >
<authorization >
<deny users="?"/>
</authorization>
</system.web>
</location>
<location path ="~/Pages/DepartmentMain.aspx">
<system.web >
<authorization >
<deny users ="?"/>
</authorization>
</system.web>
</location>
plz help me with code