默认输入屏幕 [英] default entry screen

查看:73
本文介绍了默认输入屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个登录屏幕.我希望该屏幕成为我启动应用程序时的默认输入屏幕..我应该能够通过登录屏幕访问另一个屏幕.不能访问其他屏幕通过输入URL.我该怎么做..这就是我所做的

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

<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>

推荐答案

最简单的方法是实现成员身份,并将default.aspx重定向到登录屏幕.然后,所有其他屏幕都驻留在单独的文件夹中,需要登录用户才能访问它们.实施成员资格将设置您需要的适当的web.config设置.
请参阅此处: http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx [^ ]
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[^]


1.创建登录屏幕,成功提交详细信息后,将登录保存在Session对象中.
2.在所有其他页面上,在Page_Load事件处理程序中检查Session对象,如果确定=继续,否则将重定向到登录"屏幕.

这样就可以解决问题,并在会话过期时将用户重定向到登录名.

希望对您有所帮助.
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.


此处提供了有关 ASP.NET 2.0成员资格和角色的很好的教程
http://www.4guysfromrolla.com/articles/120705-1.aspx [ ^ ]

可能对您有帮助.
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.


这篇关于默认输入屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆