cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
eugenevanstaden
Resolver II
Resolver II

Portal error when enabling Web page Access Control Rule

When enabling Web page Access Control rule with Restric Read on a page I get the following error:
Server Error in '/' Application.


The route handler 'Adxstudio.Xrm.Web.Routing.PortalRouteHandler' did not return an IHttpHandler from its GetHttpHandler() method.


I have tested this in all portals that was recently provisioned in the tenant and they all have the same issue. Portal version is 9.3.11.4

Its specific to this tenant and tested it in another with same version number where it works.

1 ACCEPTED SOLUTION

Accepted Solutions
Loz
New Member

I'm having the exact same issue.  Web Page Access Control rule is set up correctly and is associated with a Web Role.  Support ticket open with Microsoft.

 

FYI, I noticed the Page Template for "Access Denied" was missing in my custom portal.  Microsoft advised I create this manually which I did, but it still hasn't fixed the problem.

View solution in original post

8 REPLIES 8
Manar
Super User
Super User

Hi @eugenevanstaden , with Web Page Access Control rule you will need to check 2 thigs:

1- You need to ensure there is a web role associated with the Web Page Access Control so the portal restriction works properly,  ref this url  https://debajmecrm.com/understanding-restrict-read-privilege-in-dynamics-365-portals-powerapps-porta... 

2- If you are restricting everything including home page ,simply create a Web Page Access Control Rule of type Restrict Read on the Home page of your Portal – and be sure to set the scope to “Exclude direct child web files” ref https://www.engineeredcode.com/blog/power-apps-portals-no-anonymous-allowed 

 

i hope this help

Thank you,
Manar

If you like this post, give it aThumbs Up. Where it solved your query, mark it as a SOLUTION so it can help other people!
eugenevanstaden
Resolver II
Resolver II

Hi @Manar 

Yup - all of that is done - issue still exist in this environment across all 5 portals provisioned. Assume the issue is then on the actual Portal App Service and not Configuration.

I have tested this in a different tenant and it works as it should. I will escalate via MS support

Loz
New Member

I'm having the exact same issue.  Web Page Access Control rule is set up correctly and is associated with a Web Role.  Support ticket open with Microsoft.

 

FYI, I noticed the Page Template for "Access Denied" was missing in my custom portal.  Microsoft advised I create this manually which I did, but it still hasn't fixed the problem.

Manar
Super User
Super User

@Loz  this is a great point, i always use Portal Configuration Compare XrmToolBox plugin to find out what is exactly i am missing and it works great.

Manar_0-1637697356664.png

Manar_1-1637697441485.png

 

 

 

Thank you,
Manar

If you like this post, give it aThumbs Up. Where it solved your query, mark it as a SOLUTION so it can help other people!
eugenevanstaden
Resolver II
Resolver II

@Loz 

I've recreated the Access Denied Webpage + Page template with the correct settings. Thanks @Loz for checking with MS Support.

eugenevanstaden_0-1637784948169.png

 



JanB1
New Member

In case anyone else experiences the same issue as OP (we've had the same for a number of newly created portals in the last days), the solution in our case was that the Page Template for the Access Denied page was set to "Default studio template" instead of "Access Denied".

 

If you go to the Portal Management, check the Web Pages list and click on the Access Denied page. Under the Page Template, check which one is set and select Access Denied if not already set. After setting it, anonymous users should be redirected to the login screen if you have enabled web page access controls.

 

Thanks to Microsoft Support for indicating this.

opsexdeveloper
Frequent Visitor

Having come across this issue similarly when configuring a brand new Portal site, mainly when trying to visit a Page URL directly without authenticating, I get the same issue in the logs.

 

I found the issue to be a simple change on the Access Denied Web page - against the Page Template setting, was set to use the 'Default studio template', changing this to 'Access Denied' worked fine

lnguyenCCC
New Member

I want to add something more besides the Access Denied web page above. In my case, I also needed to go to Page Template, search for the Access Denied template(it was set to Type "Web Template") and change the Type to Rewrite, put the Rewrite Url as "~/Pages/AccessDenied.aspx" then saved it, after that change back the type to Web Template.

Helpful resources

Announcements
Welcome Super Users.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,352)