Quantcast
Channel: Security forum
Viewing all articles
Browse latest Browse all 12072

401 - Unauthorized: Access is denied due to invalid credentials.

$
0
0

Well i am posting this to help other developers.

i have some mvc 3 (vb) sites hosted on a IIS7. All websites was working perfectly from the server which i was connected via RDP (remote desktop) but when i was trying from the internet some sites was not working although all settings, permissions etc was correct. Remember! all sites are working local.

The sites that was not working were using customerrors mode=off and those that working were using customerrors mode=on. So if you have at your web.config something similar to the following:

<customErrors mode="Off">
      <error statusCode="404" redirect="~/error/notfound"></error>
      <error statusCode="401" redirect="~/Account/LogOn"></error>
</customErrors>

set the following to IIS7:

-> select your site -> click on error pages -> edit feature settings -> select Detailed errors

and everything works.

btw the error message should be more descriptive.


Isidoros MCTS VB.NET


Viewing all articles
Browse latest Browse all 12072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>