开发者

Getting a "Server Error in '/' Application " error in asp.net

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, o开发者_如何转开发r is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /login.aspx

The odd thing is there is no login.aspx file in the solution space and there is no reference to it anywhere in the code file of the aspx file.I have attached the code below

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

Any inputs would be great since I wasnt getting this error last week and started getting it only after we moved to a new office,So I am wondering if this is something to do with the network setup

Well I checked the forms authentication on the web.config and I dont see anything there which explains that issue

The code is below

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


You probably have forms authentication setup to redirect to Login.aspx in Web.config.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜