How to display custom message when users accessing from outside of permitted ip ranges?

Hi, my C#/asp.net application, hosted on IIS 7
The web application is configured with permitted IP ranges.  Currently it just display "You do not have permission,............................"  I vaguely remember there is a way in IIS 7 to customize this message but can't remember how.  Appreciate some guidance here, thank you.
lapuccaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

KimputerCommented:
Do a custom error page on HTTP code 403.6
However, you must remember to put this error code in a spot where the IP ranges are not applied (otherwise the person will still not see the custom page).
0
lapuccaAuthor Commented:
I think currently it's error 404.  Why use 403.6?  Where to put this code?  Do you have a good site/url with details on how to set this up?  Thank you.
0
KimputerCommented:
See MS document here: https://technet.microsoft.com/en-us/library/cc753103(v=ws.10).aspx
While it says IIS 7, all IIS versions are similar.
I mentioned HTTP status 403.6, because that's the one specifically for ip range blocking. Please check your traffic or logs carefully to find out if I was correct or not.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lapuccaAuthor Commented:
Thank you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.