Problem Statement:
We implemented a public-facing website in SharePoint 2013. We have had anonymous access enabled for the web application. The anonymous access was working fine in the Desktop View, but we faced an issue with accessibility of the site in Mobile View. SharePoint site was prompting for authentication while using in Mobile view. It was working fine while using on desktop view.
Cause of the Error:
If you notice the browser's console window, you will find some JavaScript files are not accessible as an anonymous user, it throws 401 error. SharePoint automatically detects that a user is connected with a mobile browser, and redirects them to a mobile view of the page. However, by default anonymous users don’t have access to this page. In this situation, the likely goal is to not redirect the users to the mobile page and display the desktop responsive version page.
Resolution:
To fix this issue follow the certain steps (If it is multi-tiered SharePoint farm, these steps need to be followed on all the servers in the farm): - Open the IIS Manager.
- Find the SharePoint Web Application where you found these issue.
- Explore the Web Application in File Explorer.
- Edit web.config file in a text editor.
- In <configuration> find <system .web>.
- Add or modify below code section.
- Save and browse the site, the issue should have been addressed.
<browserCaps> <result type=”System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”/> <filter>isMobileDevice=false</filter> </browserCaps> |
Reference:
https://social.technet.microsoft.com/Forums/office/en-US/d1e58832-391b-42ba-a21b-6ef40d1c9acb/anonymous-access-for-mobile-users?forum=sharepointadminprevious
If you have any questions you can reach out our SharePoint Consulting team here.