Hi,
I am working on Asp.Net MVC5 (.Net Framework 4.8 & C#) web application. The application is hosted in azure app service.
The project solution has a "Help" folder, and the contents of the help folder is static files only i.e., html files. Also, have supporting files like CSS & JS etc. ... for applying designs in html.
Folder structure –
Help folder contains a folder and a web.config file; and the folder name is Main.
Main folder contains a folder only; and the folder name is “MyModuleName”.
The “MyModuleName” folder contains html files and other supporting files. But all are static files only. Here also you couldn’t find the web.config file.
Note – the Help folder and its contents were provided by client and the folder contains too many files.
Application flow –
User first need to login with Azure AD account, then after only the user can see the help icon too.
Initially we got the error while clicking the help icon as the route config blocked the static files. To fix that, I added below line at Help/web.config file, then it is working fine –
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />
The issue –
The issue is the help URLs / HTMLs are accessible without login too. But as per the requirement, the help files should be accessed only logged in users. Role / Authorization is not a matter, but Authentication is mandatory.
Could you please provide few guidance to resolve this?
Thanks in advance.