Closed mhintner closed 4 years ago
Hi @mhintner, my current state of knowledge is that you cannot use the same claims provider (class) with multiple SPTrustedIdentityTokenIssuers because at runtime there is no way to determine what TrustedLoginProvider is currently calling. Did you find a way to deal with that, but you're stuck on a different problem, or is it not working because of that?
Hi Yvan, I use the description of SPTrustedIdentityTokenIssuer to store the url of the RootSC and at runtime I try to find the correct one based on the current URL. This works fine for the RootSC in different WebApps but doesn't work for path based SCs below (at least not for SiteSettings, regular pages are ok). The error when opening the SiteSettings of a path based SC is "File not found". Kind regards, Markus
When you say that non-root path-based SPSite don't work in site settings, what exactly is not working?
The error when opening the SiteSettings of a path based SC is "File not found".
So you simply navigate to the site settings and you get an error "File not found"? I don't see how this error can be possibly related to the custom claims provider. What makes you think so?
Yes, that's the effect. It is reproducible in two environments, as soon as the ClaimsProvider is removed, everything works fine.
Do you have any technical details about what happens when you browse to that page? Is AzureCP class called?
Yes AzureCP is called, but the following exception occurs:
Getting Error Message for Exception System.ArgumentNullException: Value cannot be null.
at Microsoft.SharePoint.SPSite.OpenWeb(String strUrl, Boolean requireExactUrl)
at Microsoft.SharePoint.SPSite.get_RootWeb()
at Microsoft.SharePoint.Navigation.SPNavigationProvider.GetChildNodes(SiteMapNode node)
at System.Web.UI.WebControls.SiteMapDataSource.GetTreeView(String viewPath)
at System.Web.UI.WebControls.HierarchicalDataBoundControl.GetData(String viewPath)
at System.Web.UI.WebControls.Menu.DataBindItem(MenuItem item)
at System.Web.UI.WebControls.Menu.PerformDataBinding()
at System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
at System.Web.UI.WebControls.Menu.EnsureDataBound()
at Microsoft.SharePoint.WebControls.AspMenu.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I don't have any possible explanation for this, AFAIK I never got that behavior
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi Yvan, I'm trying to make AzureCP runnable with multiple SPTrustedIdentityTokenIssuers. There are multiple WebApps, each with an associated AzureAD Tenant. I changed you code a bit so that the appropriate provider is selected at runtime. Everything works fine as long as I'm using the Root SC of every WebApp only. As soon as I want to open settings.aspx in another SC, an unexpected error occurs. Do you have any idea? Thanks in advance, Markus