我试图使用一个用 ASP.NET 编码并在 IIS 和 SQL Server 2008 上运行的软件。
我已经安装了它,包括数据库等。
当我开始使用脚本(安装在运行 IIS 的本地机器上)并登录到软件时,我遇到了错误。当我使用有效的登录名时,它会给我一个错误
Redirect URI cannot contain newline characters.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Redirect URI cannot contain newline characters.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Redirect URI cannot contain newline characters.]
System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent) +11327996
PirTickets.Account.Login.LoginButton_Click(Object sender, EventArgs e) +1158
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3691
但是,当我输入无效登录时,它会给我一条无效的消息。我知道与数据库的连接没问题,因为它正在从数据库获取的其他地方输出文本。
下面是 Login.ASPX 代码:
<%@ Page Title="Log In" Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="true"
CodeBehind="Login.aspx.cs" Inherits="PirTickets.Account.Login" EnableViewStateMac="false" ViewStateEncryptionMode="Never" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="Head">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
<h2>
Log In
</h2>
<p>
Customers and Trade users log in
<a href="../Custlogin.aspx">here</a>
</p>
<span class="failureNotification">
<asp:Literal ID="FailureText" runat="server"></asp:Literal>
</span>
<div class="accountInfo">
<fieldset class="login">
<legend>Account Information</legend>
<p>
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Username:</asp:Label>
<asp:TextBox ID="UserName" runat="server" CssClass="textEntry" EnableViewState="False"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required."
>*</asp:RequiredFieldValidator>
</p>
<p>
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
<asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password" EnableViewState="False"></asp:TextBox>
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
CssClass="failureNotification" ErrorMessage="Password is required." ToolTip="Password is required."
>*</asp:RequiredFieldValidator>
</p>
<p>
<asp:CheckBox ID="chkRememberMe" runat="server" Text="Remember Me"
TextAlign="Left" />
</p>
</fieldset>
<p class="submitButton">
<asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In"
onclick="LoginButton_Click"/>
</p>
</div>
</asp:Content>
任何人都可以解决这个问题吗?如果需要任何其他信息,请询问,我将编辑此问题,
干杯