Mojn,

kann mir bitte mal einer verraten, wo hier mein Fehler liegt? Ich m�chte
eine Forms Authentifizierung machen, lande aber immer wieder im
Authentifizierungsformular!

web.config:

----------------------------------------------------------------------------
--------------

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    
  <system.web>
    <compilation defaultLanguage="vb" debug="true" />
    <customErrors mode="RemoteOnly" />

    <authentication mode="Forms" >
                <forms name="LogOnCookie" path="http://intranet6/testarea/";
loginUrl="login.aspx" protection="All" timeout="25">
                        <credentials passwordFormat="Clear">
                                <user name="Steffen" password="test" />
                        </credentials>
                </forms>
    </authentication> 
    <authorization>
        <deny users="?" />
    </authorization>
    <trace enabled="false" requestLimit="10" pageOutput="false"
traceMode="SortByTime" localOnly="true" />
    <sessionState 
            mode="InProc"
            stateConnectionString="tcpip=127.0.0.1:42424"
            sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
            cookieless="false" 
            timeout="20" 
    />
    <globalization requestEncoding="utf-8" responseEncoding="utf-8" />   
  </system.web>
</configuration>
-------------------------------------------------------------------------

login.aspx

-------------------------------------------------------------------------
<%@ Page language="vb" Codebehind="login.aspx.vb" AutoEventWireup="false"
Inherits="testarea.login" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
        <HEAD>
                <title>login</title>
                <meta name="GENERATOR" Content="Microsoft Visual Studio
7.0">
                <meta name="CODE_LANGUAGE" Content="C#">
                <meta name="vs_defaultClientScript" content="JavaScript">
                <meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5";>
        </HEAD>
        <body MS_POSITIONING="GridLayout">
                <h1>Anmeldung erforderlich</h1>
                <form runat="server" ID="Form1">
                        <table>
                                <tr>
                                        <td>Name:
                                        </td>
                                        <td>
                                                <asp:TextBox Runat="server"
ID="logName" />
                                        </td>
                                </tr>
                                <tr>
                                        <td>Kennwort:
                                        </td>
                                        <td>
                                                <asp:TextBox
TextMode="Password" Runat="server" ID="logPassword" />
                                        </td>
                                </tr>
                                <tr>
                                        <td></td>
                                        <td>
                                                <asp:Button Runat="server"
ID="Submit" Text="Anmelden" OnClick="Login_Click" />
                                        </td>
                                </tr>
                        </table>
                        <asp:Label Runat="server" ID="LoginError"
BackColor="Red" ForeColor="White" />
                </form>
        </body>
</HTML>
----------------------------------------------------------------------------
------------------
login.asbx.vb
----------------------------------------------------------------------------
------------------
Imports System.Data
Imports System.Web.Security

Public Class login
    Inherits System.Web.UI.Page
    Protected logName As TextBox
    Protected logPassword As TextBox
    Protected WithEvents Submit As System.Web.UI.WebControls.Button
    Protected LoginError As Label

    Public Sub Login_Click(ByVal sender As Object, ByVal e As EventArgs)
        If FormsAuthentication.Authenticate(logName.Text, logPassword.Text)
Then
            FormsAuthentication.RedirectFromLoginPage(logName.Text, True)
        Else
            LoginError.Text = "Fehler: Anmeldedaten falsch."
        End If
    End Sub
End Class
----------------------------------------------------------------------------
------------------------------

Ich wei� zur Zeit nicht mehr, wo ich noch suchen soll! :(((
Danke,mit freundlichen Gr��en

> Steffen Grau
> 
> 
_______________________________________________
Asp.net mailing list
[EMAIL PROTECTED]
http://www.glengamoi.com/mailman/listinfo/asp.net

Antwort per Email an