Set authentication mode to No :
<authentication mode="None" />
No Does not specify authentication. Only anonymous users are expected in your application, or the application provides its own authentication.
http://msdn.microsoft.com/en-us/library/532aee0e.aspx
Of course, you must provide some authentication through headers or tokens or something else. You can also specify Windows and use the built-in auth through the headers.
If this site is mixed between the API and the actual pages that need Forms customization, then you will need to write your own processing.
The whole attribute returns an instance of HttpUnauthorizedResult , the redirection is performed outside the attribute, therefore its not a problem, its authentication provider.
Paul Tyng Mar 02 2018-12-12T00: 00Z
source share