得到一个;'中的服务器错误/';申请书;asp.net中的错误

得到一个;'中的服务器错误/';申请书;asp.net中的错误,asp.net,Asp.net,奇怪的是,在解决方案空间中没有login.aspx文件,在aspx文件的代码文件中也没有对它的引用 Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is

奇怪的是,在解决方案空间中没有login.aspx文件,在aspx文件的代码文件中也没有对它的引用

Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /login.aspx
任何输入都会很好,因为我上周没有收到这个错误,只是在我们搬到新办公室后才开始收到,所以我想知道这是否与网络设置有关

我检查了web.config上的表单身份验证,没有看到任何可以解释这个问题的东西

代码如下

protected void Onbutton_click_login(object sender, System.EventArgs e)
    {
        var dbcontext = new PrepLicensingSolution2010.DAL.LicensingEntities1();
        var user = dbcontext.userpassword(loginName.Text);
        string HashedPassword = FormsAuthentication.HashPasswordForStoringInConfigFile(Password.Text, "sha1");
    if (user.FirstOrDefault() == HashedPassword)
    {


        Response.Redirect("/Members/members.aspx");

    }
    else
    {
        Response.Redirect("signin.aspx");
    }

}

protected void rbUser_Index_Changed(Object sender, EventArgs e)
{

    if (rbUser.SelectedItem != null)
    {
        if (rbUser.SelectedItem.Value == "0")
        {
            Response.Redirect("signup.aspx");
        }
        else
        {
            rbUser.SelectedIndex = 1;
        }
    }
}


您可能有表单身份验证设置,可以重定向到Web.config中的
Login.aspx

您应该使用salt和更安全的哈希。或者最好是bcrypt。我希望您有一个登录cookie。我计划使用登录cookie,但这是实施细节的第一阶段。对于解决方案的简单性,我感到抱歉,但我仍在寻找解决asp的方法。netI强烈建议您放弃这一点,改用标准表单验证。编写安全代码很难;您应该使用Microsoft的测试实现,或者iis将其设置为唯一的默认页面。或者,如果它在dev studio中不是远程服务器,则可以在应用程序web属性页面中引用它。不过,您可能是对的。假设IIS已将其设置为默认值,如何覆盖它?听起来您好像没有使用表单身份验证。如果是这样,请将其从Web.config中删除。非常感谢,您能解释为什么这是问题的根本原因吗?表单身份验证使用
Login.aspx
。如果不使用Forms auth,则不应尝试启用它。
<authentication mode="Forms" />
<!--
        The <customErrors> section enables configuration 
        of what to do if/when an unhandled error occurs 
        during the execution of a request. Specifically, 
        it enables developers to configure html error pages 
        to be displayed in place of a error stack trace.

    <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
        <error statusCode="403" redirect="NoAccess.htm" />
        <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>
    -->