我在aspx中使用登录身份验证时遇到问题 [英] I'm having problem in Login use form authenication in aspx

查看:93
本文介绍了我在aspx中使用登录身份验证时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好...我在登录时遇到一些问题,当我以用户身份登录时,它进入了用户的主页,一旦我注销并以管理员身份登录,它就进入了成员的页面和再次我需要单击顶部的选项卡上的管理站点,它重定向到登录页面,第二次当我使用admin passwrd登录时,它进入了管理站点.工作人员站点也是如此.该网站有3个角色,分别是Admin,User和Staff.有没有人可以帮助我,我会很高兴.在这里,我将提供正在运行的aspx和vb代码.请帮助我.谢谢

ASPX

Hi there...i''m having some problem in login where when i login as user,it entered in user''s main page and once i logged out and login as admin,it entered the member''s page and again i need to click on the admin site which the tab is on the top and it redirect to login page and the second time when i login use admin passwrd,it entered to admin site.The same goes to the staff site.There are 3 roles in this website which is Admin,User and Staff.Is there anyone can help me i''ll be glad.Here i''ll provide the aspx and vb code which is running behind.please help me.thanks

ASPX

<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Login.aspx.vb" Inherits="Login" title="Welcome To 7-Eleven website" %>

<%@ Register assembly="FlashControl" namespace="Bewise.Web.UI.WebControls" tagprefix="Bewise" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style9
        {
            color: #000000;
        }
        .style10
        {
            color: #FF0000;
            font-family: Algerian;
            font-size: medium;
        }
        .style8
        {
            color: #006600;
            font-family: Algerian;
            font-size: medium;
        }
        .newStyle1
        {
            font-family: Algerian;
            font-size: medium;
        }
        .newStyle2
        {
            font-family: Algerian;
            font-size: medium;
        }
        .newStyle3
        {
            font-family: Algerian;
            font-size: medium;
            font-weight: bold;
        }
        .style11
        {
            font-size: large;
        }
        .style12
        {
            color: #000000;
            font-family: Algerian;
            font-size: medium;
        }
        </style>
    </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <p>
        &nbsp;
        <asp:Image ID="Image1" runat="server" ImageUrl="~/pix/7-11 logo.jpg"

            Height="98px" Width="121px" /><br />
        </p>
    <p>
        &nbsp;</p>
    <p>
        <strong>

        <span class="style11">&nbsp;</span>

        <span class="style10">7</span><span style="color: #333300"><span

            class="style12">-</span></span><span class="style8">Eleven...</span><span class="newStyle1"><span class="style9">your
        only 24/7 Operating outlet </span></span></strong></p>
    <p>
        <strong>

        <span style="color: #333300"><span

            style="font-size: 14pt; " class="style9"><br />
                        </span></span></span></span></span></span>
<html>

<body>

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"



codebase="http://download.macromedia.com/pub/shockwave/
cabs/flash/swflash.cab#version=6,0,40,0"



width="800"

 id="7eleven" style="height: 120px">

<param name="movie"



value="7eleven" />

<param name="quality" value="high" />

<param name="bgcolor" value="#ffffff" />

<embed src="pix/7-eleven.swf" quality="high" bgcolor="#000000"



width="800" height="300"



name="7eleven" align="" type="application/x-shockwave-flash"



pluginspage="http://www.macromedia.com/go/getflashplayer">


</embed>

</object>

</body>

</html> </strong></p>
    <p>
    <br class="style9" />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Image ID="Image3" runat="server" ImageUrl="~/pix/7ELEVEN copy.jpg"

            Width="264px" />
    <br />
    <asp:Login ID="Login1" runat="server" BackColor="#F7F6F3" BorderColor="#E6E2D8"

        BorderPadding="4" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana"

        Font-Size="0.8em" ForeColor="#333333"

        DestinationPageUrl="~/MainPage.aspx" style="text-align: center" Height="171px"

                    Width="266px"  VisibleWhenLoggedIn="True">
        <TextBoxStyle Font-Size="0.8em" />
        <LoginButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid"

            BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284775" />
        <InstructionTextStyle Font-Italic="True" ForeColor="Black" />
        <TitleTextStyle BackColor="#5D7B9D" Font-Bold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p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

        </p>
    <p>
        &nbsp;</p>
    <p style="text-align: center">
           <!-- begin embedded Flash file... -->


        <!-- ...end embedded Flash file -->
       </table>
&nbsp;</p>
    <p style="text-align: center">
        <asp:LinkButton ID="LinkButton1" runat="server" Font-Size="16pt"

            PostBackUrl="~/Register.aspx">Register</asp:LinkButton>
        &nbsp;</p>
    <p style="text-align: center">
        &nbsp;<asp:Image ID="Image2" runat="server" Height="156px" ImageUrl="~/pix/banner.png"

            Width="726px" /><br />
        <span style="font-size: 10pt; color: #000000">© 2011 7-Eleven Malaysia Sdn.Bhd. | All rights reserved |</span><br />
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
</asp:Content>





VB CODE





VB CODE

Partial Class Login

    Inherits System.Web.UI.Page

End Class

推荐答案

You need to handle the LoggedIn event of the Login control and redirect as necessary.
You need to handle the LoggedIn event of the Login control and redirect as necessary.


这篇关于我在aspx中使用登录身份验证时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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