Reputation: 750
I have a website designed using ASP.NET MVC4 which has a specific Controller 'ProductionLogs' which will display the top 25 logs from the Production Server on typing the URL https://(myapp.com)/ProductionLogs/GetTop25Logs . This is possible only for a user authorized to login to the application.,i.e, once they have correctly entered the UserName and Password and gained access into the application. But I have decided to make this URL available for anyone, without even be able to logging in. Just anyone who types the URL mentioned above, would be able to see the page displaying the latest 25 logs. How to go about?
[Note : I have eliminated the option of 'enabling the directory browsing' in the IIS Server. I have also eliminated the option of developing a custom HTTP module.]
Upvotes: 1
Views: 149
Reputation: 1965
You can use AllowAnonymous
attribute, it means that authorization is not required
[AllowAnonymous]
public ActionResult GetLogs() {
// ...
}
Upvotes: 2