2011-08-18 67 views
0

我为我的web应用程序配置了FBA,该应用程序可以使用默认登录页面正常工作。所以我想为该应用程序创建custonm登录页面。为此,我创建了一个自定义登录页面。但是当我输入证书时,它给我一个错误,如下所示。如何为FBA应用程序添加自定义登录页面

Server Error in '/' Application.

Object reference not set to an instance of an object. 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.NullReferenceException: Object reference not set to an instance of an object.

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:

[NullReferenceException: Object reference not set to an instance of an object.]
LdapContosoAuthentication.Layouts.LdapContosoAuthentication.LoginCustmCntrlPage.Button1_Click(Object sender, EventArgs e) +193
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +114
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +139
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +28
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2980

谁能告诉我怎么解决这个错误?

回答

0

将您的自定义页面放在布局文件夹中,并进行以下更改。所以,你可以打开你的自定义登录页面:

<authentication mode="Forms"> 
    <forms loginUrl="/_layouts/CustomLogin.aspx" /> 
</authentication> 

是否已进行了login.aspx的页面的委托控制(登录控制)是否有变化?

相关问题