문제

SharePoint 2013에 대한 사용자 정의 로그온 페이지를 만들려고합니다. 2013 버전의 모델로 사용하고있는 제가 잘 작동하는 기존 2010 프로젝트가 있지만 작업 할 수 없습니다. < / P>

작업을 수행 한 것은 멀티 로그 론 페이지를 기반으로하는 내 자신의 빈 페이지를 만들고 있지만 병합 된 로그인 페이지 (양식, Windows 리디렉션 등)를 수행하려고합니다. 그리고 기존 페이지에서 상속하는 것은 많은 제한이 있습니다. 특히 어떤 종류의 주요 코드문이 리드를 리드 :

작업은 객체의 현재 상태로 인해 유효하지 않습니다. 설명 : 실행중인 처리되지 않은 예외가 발생했습니다. 현재 웹 요청. 더 많은 스택 추적을 검토하십시오 오류 및 코드에서 시작된 위치에 대한 정보.

예외 세부 사항 : System.InvalidOperationException : 작동이 아닙니다. 객체의 현재 상태로 인해 유효합니다.

소스 오류 :

처리되지 않은 예외가 발생하지 않았습니다. 현재 웹 요청. 원산지와 위치에 관한 정보 예외는 아래 예외 스택 추적을 사용하여 식별 할 수 있습니다.

스택 추적 :

[InvalidOperationException : 현재로 인해 작동이 유효하지 않습니다. 물체의 상태.]
Microsoft.SharePoint.IdentityModel.Pages.multilogonPage.Onload (EventArgs) e) +1118 system.web.ui.control.loadrecursive () +95
system.web.ui.page.ProcessRequestMain (boolean. includeStagesBeforeasyncpoint, 부울 includestagesafterasyncpoint) +2936

로그인 페이지의 모든 사용자를 허용하도록 설정되어 있기 때문에 Web.config 문제가 아닙니다.

나는 기본 설정에서 분명히 뭔가를 놓치지 만, 나는 무엇을 모른다.

http://davidlozzi.com/2011/07/15/sharepoint-2010-create-unique-login-page-with-forms-based-authentication/ 이것은 꽤 간단합니다. .

모든 것이 기본 영역에 있으므로 그 주위에 아무 것도 아닙니다. 로그인 페이지로의 리디렉션이 발생하기 때문에 웹 응용 프로그램에 대해 로그인 페이지가 올바르게 설정됩니다.

도움이 되었습니까?

해결책

I basically gave up and threw away what I had, starting over with http://davidlozzi.com/2011/07/15/sharepoint-2010-create-unique-login-page-with-forms-based-authentication/. The key I think is inheriting from the Forms sign-in page, but that's still squirrelly. I'd rather know exactly what that class is doing that lets it work but I don't have time to dig into it and replicate it.

다른 팁

That error seems to occur when you attempt to use a CodeFile (aspx.cs) with a Page that inherits from Microsoft.SharePoint.IdentityModel.Pages.MultiLogonPage.

The error doesn't come up when you use compiled code or use CodeBehind and place the aspx.cs page in the App_Code directory.

You can also get rid of the error by removing base.Onload() from your overrided OnLoad method.

 protected override void OnLoad(EventArgs e)
    {
        //base.OnLoad(e);
    }

If you do this, the page title and text in front of the drop down list asking you to select an authentication method does not show up.

However, the drop down list is still added to the page and is still functional.

The MultiLogonPage is meant for allowing the user to select from a drop down list of login types and forward the user to the appropriate login type based off the postback from the drop down list.

Not quite sure why the error only occurs when trying to use a CodeFile, but there are ways to get it working, as I mentioned.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top