windows authentication - ASP.Net MVC app- Authorization performs differently on staging server -


We are developing an ASP.NET MVC intranet style app and are trying to take advantage of window authentication because users The vast majority of are pre-certified for local domains.

Authentication is implemented in a fair standard way, for information about role only which we have chosen to store in our database, we have implemented it in two different ways (custom rollspeaver And override context. User - IS INOL) both of whom are required without the need of the development environment hosted on both IIS Express and the local IIS server. And fulfill the work.

The problem once we move the app to a staging environment, which is still on the same local network / domain, neither the authentication method works with both the Windows certification role provider It is not taken into consideration.

To display this I have a part of the code in my Home / Index page that calculates the Windows Domain Group and tests for the user. Each of them, besides user.IsInRole ("user") (a custom role) Under the development environment, each Windows group gives false false, while the custom role is correct. Unlike the staging environment, the opposite is true.

I am happy with any method of achieving the desired result, so I am after some signals that none of the following do not work.

  • Custom role provider is not impacting

  • Global. Asks "Application_AuthenticateRequest" event never fire, this Type the custom user object with override IsInRole method is not used.

    Protected void application_AuthenticateRequest (Object Sender, EventArgs E) {If (reference user! = Null) reference. User = new UserPrincipal (context.User.Identity); }

    Server 2008, IIS 7, MVC 5.1

    Thank you in advance.

    This issue I runAllManagedModulesForAllRequests = "true" to extract from the module section of my application's web.config After the recommendation, although it did not stop the firing incident related applications (as the module was not registered).

    See the article here and more information about this issue in the comments.

    Runallam Management Models Forlaffes = "True" attribute has now been resolved by altering this issue, although I am trying to install the MS Hotfix provided that is mentioned in this and / or manual Moderately registered modules have been done to overcome reliance.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -