Frage

Ich versuche, eine benutzerdefinierte Anmeldeseite für SharePoint 2013 zu erstellen. Ich habe ein bestehendes Projekt 2010, das gut funktioniert, dass ich als Modell für eine Version 2013 verwende, aber ich kann es nicht zur Arbeit bringen. < / p>

Was funktioniert hat, macht meine eigene leere Seite, die auf MultilogOnPage basiert, aber ich versuche, eine zusammengeführte Anmeldeseite (Formular, Windows-Weiterleitungen usw.) durchzuführen. Und es scheint, dass das Erben von der vorhandenen Seite viele Einschränkungen hat. Insbesondere irgendeine Art von wichtigen Codebehind führt zu:

Der Betrieb ist aufgrund des aktuellen Status des Objekts nicht gültig. Beschreibung: Eine ungehinderte Ausnahme erfolgte während der Ausführung von die aktuelle Webanfrage. Bitte überprüfen Sie die Stack-Trace für mehr Informationen zum Fehler und wo er im Code entstanden ist.

Ausnahmedetails: System.invalidoperationException: Die Bedienung ist nicht Gültig aufgrund des aktuellen Status des Objekts.

Source-Fehler:

Bei der Ausführung der wurde eine unbehandelte Ausnahme erzeugt Aktuelle Webanfrage. Informationen zum Ursprung und Ort von Die Ausnahme kann mit der nachstehenden Ausnahmestapel-Trace identifiziert werden.

Stapel-Trace:

[InvalidoPerationException: Der Betrieb ist aufgrund des Stroms nicht gültig Zustand des Objekts.]

Microsoft.Sharepoint.IdentityModel.pages.multilogonpage.onLoad (EventArgs. e) +1118 system.web.ui.control.loadRecursive () +95
System.web.ui.page.processRequestmain (Boolean. IncletRestagesbeforeasyncPoint, boolean einschließlich +2936

Es ist kein Web.config-Problem, da dadurch eingestellt ist, dass alle Benutzer auf der Anmeldeseite auf der Anmeldeseite ermöglicht werden.

Ich vermisse eindeutig etwas im grundlegenden Setup, aber ich weiß nicht was.

Es scheint sicherlich von Orten wie http://davidlozzi.com/2011/07/15/sharepoint-2010-create-unique-login-page-with-forms-based-authentication/ das ist das ziemlich einfach .. .

Alles ist jetzt in der Standardzone, also ist es nicht etwas dabei. Die Anmeldeseite ist ordnungsgemäß für die Webanwendung eingestellt, da die Weiterleitung auf der Anmeldeseite erfolgt.

War es hilfreich?

Lösung

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.

Andere Tipps

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit sharepoint.stackexchange
scroll top