Click here to Skip to main content
15,904,023 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,I have created a login screen.I want this screen to be the default entry screen when I launch my application..I should be able to access the other screen via the login screen..no other screen may be accessed by typing in a URL. how can i do this.. this is what I have done

XML
<appSettings>
    <add key="xxxx" value="http://swetha.documents/"/>
    <add key="xxxx" value="http://swetha.documents.com"/>
        <add key="Base" value="/App_CodeFiles/web.config"/>
        <add key="Location" value="/CodeFiles/Chart.config"/>

        <add key="Url" value="https://ivs/login.aspx"/>
    <add key="Sup" value="983469"/>
    <add key="Su" value="sweta@honeywell.com"/>

    <add key="Handler" value="storage=memory;timeout=20;"/>
  </appSettings>
Posted
Updated 15-Mar-12 21:50pm
v2

The easiest way is to implement Membership, and have the default.aspx redirect to the login screen. All other screens then reside in a separate folder which requires a logged in user to access them. Implementing Membership will set the appropriate web.config settings you need.
See here: http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx[^]
 
Share this answer
 
Comments
V. 16-Mar-12 4:13am    
Nice, didn't think of that. I'll check this out as well.
1. Create a login screen, upon successful submitting the details you save the login in a Session object.
2. On all other pages, in the Page_Load event handler you check the Session object, if OK = continue else redirect to Login screen.

That should do the trick and also redirects the user to login when the session expires.

Hope this helps.
 
Share this answer
 
A good tutorial on ASP.NET 2.0 Membership and Roles is given here
http://www.4guysfromrolla.com/articles/120705-1.aspx[^]

It may be helpful to you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900