I am using NTLM basic authentication.
When accessing an invalid page such it will got to 401, how do I redirect it to a custom error page.'
The same question when you do for a bad request 400.
As far as I know, it is not possible to redirect the request to a custom error page.
Is it possible to append the request to a load balancer.
When accessing an invalid page such it will got to 401, how do I redirect it to a custom error page.'
According to your description, if you want to redirect the url to a custom error page when the user request is not authorized, have you tried a similar solution in this case?
ASP.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
None
0 Points
12 Posts
How to Fix 401 error and Bad Request 400
Sep 15, 2020 01:21 AM|alvinoo|LINK
Hi there,
I am using NTLM basic authentication.
When accessing an invalid page such it will got to 401, how do I redirect it to a custom error page.'
The same question when you do for a bad request 400.
As far as I know, it is not possible to redirect the request to a custom error page.
Is it possible to append the request to a load balancer.
None
0 Points
12 Posts
Re: How to Fix 401 error and Bad Request 400
Sep 15, 2020 05:24 AM|alvinoo|LINK
Any updates
All-Star
48670 Points
18169 Posts
Re: How to Fix 401 error and Bad Request 400
Sep 15, 2020 07:24 AM|PatriceSc|LINK
Hi,
401 should tell the browser authentication is required. IMO you dont't need a custom page for this one.
You could try https://www.tutorialsteacher.com/articles/display-custom-error-page-with-error-code-in-aspnet-mvc or you could customize the IIS default error pages found at %SystemRoot%\Help\IisHelp\Common
Contributor
2340 Points
736 Posts
Re: How to Fix 401 error and Bad Request 400
Sep 16, 2020 03:59 AM|XuDong Peng|LINK
Hi alvinoo,
According to your description, if you want to redirect the url to a custom error page when the user request is not authorized, have you tried a similar solution in this case?
ASP.NET WindowsAuthentication custom 401 Unauthorized error page
Best regards,
Xudong Peng