1

I have a custom utility page in the 8.2 instance, placed at this location:

-website
|_sitecore
  |_minions
    |_mypage.aspx

In the Page_Load, there is only one method to check if user is logged in. If not, it will redirect to the login page. This works fine.

Now, I have deployed the files to a 9.3 instance and the custom page never loads. It redirects to the login page.
On debug, Sitecore.Context is null & hence Sitecore.Context.IsLoggedIn is false.

enter image description here

When I move my page to the admin folder in 9.3, it works fine:

-mysite93
|_sitecore
  |_admin
    |_minions
     |_mypage.aspx

I'm logged in as admin in both instances.
Why does it work in 8.2 even when outside the admin folder but not in 9.3. I want to keep my custom folder outside the admin folder and still make it work for 9.3. Is it possible. If yes, how.

5
  • 1
    I tried this in a vanilla Sitecore 9.3 instance and I didn't experience this behavior. I tried with both an existing admin page moved outside the \sitecore\admin folder and a new page under a custom folder. Do you have different authentication settings in IIS on your minions folder? Feb 21, 2020 at 3:32
  • @AlessandroFaniuolo No special settings in IIS
    – sukesh
    Feb 21, 2020 at 5:43
  • @Qwerty are you using Glass Mapper if yes then have you checked that Glass service is initialized Feb 25, 2020 at 22:35
  • @NikhilKulkarni. Not using glass mapper
    – sukesh
    Feb 26, 2020 at 10:50
  • @Qwerty - could you please try by changing the virtual, physical folder from "/sitecore/admin" to "/" for "admin" side in Sitecore.config? -<site name="admin" virtualFolder="/sitecore/admin" physicalFolder="/sitecore/admin" enableTracking="false" enableWorkflow="true" domain="sitecore" loginPage="/sitecore/admin/login.aspx" /> Feb 28, 2020 at 12:18

1 Answer 1

3
+25

Is it possible with the use of Identity Server at the /sitecore/ path is not included in one that is authenticated with IS?

Consider this file Sitecore.Owin.Authentication.IdentityServer.config at the very end there is a section indicating which paths are authenticated.

<sites>
  <site name="shell" set:loginPage="$(loginPath)shell/SitecoreIdentityServer"/>
  <site name="admin" set:loginPage="$(loginPath)admin/SitecoreIdentityServer"/>
</sites>

Perhaps patching in a new entry for your custom path would make it work?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.