
Hi @Mohammed Abed ,
We can work together to narrow down and resolve the situation. So, Please kindly provide more information below to let us work further.
1.Please check the steps to configure anonymous access for a SharePoint 2019 web application.
2.Do you have an anonymous user policy that stops users from accessing the content?
Central Administration->Web Application management
- Configure anonymous access at site permissions?
- Enable Anonymous Access at IIS.
Open IIS Manager->Select your website->Open the Authentication settings->Make sure “Anonymous Access” is enabled.
5.Check that the location is allowed at web.config.
<location path="_layouts/15/Your.Solution.Folder/page.aspx">
<system.web>
<authorization>
<allow users="*"></allow>
</authorization>
</system.web>
</location>
Reference: https://www.koskila.net/troubleshooting-anonymous-access-sharepoint-onpremises/
Hope the information can help you. And if there have any unclear or misunderstanding, please feel free to post back and we’ll continue to help you all the time!
Your understanding and patience will be highly appreciated! Hope you have a good day and keep safe!
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.