Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4251352
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:39:01+00:00 2026-05-21T04:39:01+00:00

This might at first glance seem rather similar to this question , but in

  • 0

This might at first glance seem rather similar to this question, but in my case I have implemented standard AspNetSqlMembershipProvider based security in my MVC application.

When I deploy my application on localhost or a in-house staging server, everything works as expected – most of the HomeController and AccountController actions are visible to unauthenticated users and all others are protected (I use [Authorize] attribute for marking up classes and methods that need to be protected)

The problem is that when I deployed my application to the live hosting server, basically all the requests get redirected to the login page without any apparent reason.

I realize that I must be overlooking some simple but crucial bit of configuration, but since I am new to this whole .NET thing (never mind the ASP and MVC) I can not for the life of me figure out what’s wrong or missing

If more information is required, please let me know and I will be glad to provide.

Edit: There are no <location> elements in the Web.config. Also, the differences in staging vs. live site Web.config are only in connection strings and Elmah logger configurations.

Also, the code that registers global filters is quite standard (I have not touched this):

public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
    filters.Add(new HandleErrorAttribute());
}

Maybe there is something in the server configuration that might cause the different behavior? Where should I look?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:39:02+00:00Added an answer on May 21, 2026 at 4:39 am

    As it turned out, the issue was indeed a “trivial configuration problem”, although it had nothing to do with asp.net or mvc as such.

    In my hosting provider’s control panel I simply had to grant Anonymous user permission to read files from the physical folder of the application.

    Once this was done, the application code worked as expected.

    It seems that since the anonymous (unauthenticated) user did not have read permissions to anything from the physical filesystem IIS interpreted this as 401 error and automatically redirected all the requests to the configured login method (which was set to “Forms”), resulting in this semingly weird error message.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question might not seem programming related at first, but let me explain. I'm
I know this question might sound a little cheesy but this is the first
This might seem like a stupid question I admit. But I'm in a small
This might seem obvious but I've had this error when trying to use LINQ
This might sound like a little bit of a crazy question, but how can
This might be an odd question, but when I scale my image in C#
This might be a stupid question but if there's a better or proper way
I have been struggling with a problem that at first glance might look easy
This might be on the discussy side, but I would really like to hear
This might be a bit on the silly side of things but I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.