You did not share the IIS authentication configuration or the location of topic.aspx. For Web Forms, I create a public folder and allow anonymous users access to the folder rather then a page.
web config page access and permission not working with Global asax Routing
Donald Symmons
2,856
Reputation points
How do I give permission to a web page or web form for all users in web config file when routing is done in the Global asax file?
This is how I grant permission to all users in the web config file for a page named topic.aspx
<location path="topic.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
In the Global asax file, the routing is done as this
routes.MapPageRoute("topic", "topic/{ArticleId}/{Slug}", "~/topic.aspx");
When I try to access the page, I get redirected to login. I also tried to change the location path in web config file from topic.aspx to topic because of the Routing in Global asax
<location path="topic">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
But it doesn’t work