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

  • SEARCH
  • Home
  • 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 8381541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:43:16+00:00 2026-06-09T16:43:16+00:00

I am trying to share authentication and authorization between different web applications (asp.net application

  • 0

I am trying to share authentication and authorization between different web applications (asp.net application and a MVC4 Application).

I read that you should set the machine key and those values to be the same between the sites. I have done this and the authentication is working properly.

But now in the MVC Application i want to use the Authorize attribute to make sure users can only see what the are supposed to see. This is not working.

I also checked.

When I call User.IsInRole(“Admin”) from the ASP.Net application(this is where the login is done) the value returned is true, but then when navigating to the MVC application the same call returns false.

It seems that the roles is not being shared across the application, is it possible to get is working or should i Create a custom Authorize Attribute ?

thanks in davance

  • 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-06-09T16:43:17+00:00Added an answer on June 9, 2026 at 4:43 pm

    The more applications you have, the more problematic it is to share the forms cookie. And ultimately, if two applications are on different domains (something.foo.com and somethingelse.bar.com) this won’t work as you can’t force your browser to submit a cookie to two different domains.

    This only works if you have manual control over your forms cookie and issue it for .yourdomain.com top level domain and you have your applications in subdomains (app1.yourdomain.com, app2.yourdomain.com). And this could be a serious restriction.

    What you could possibly do is to externalize your authentication, i.e. create a separate web application with the sole goal to authenticate and authorize your users. You pick one of Single Sign-on protocols (WS-Federation, OAuth2, OpenID) and federate your application environment around this authentication provider.

    It possibly sounds difficult, especially if this is new to you but if you invest your time, there are only benefits.

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

Sidebar

Related Questions

I am trying to share sessions between two web applications, both hosted on the
I am trying to integrate openid authentication in asp.net 4 and have followed the
I'm trying to start a connection to a samba share that requires authentication. I
I have an ASP.NET MVC intranet site that uses Windows Authentication (Kerberos) exclusively with
I'm trying to access a samba share that requires authentication. I do not want
Hi I am trying to share contact (vcard) through sms/mms gateway, should i encode
I am trying to share two different using one shared memory block using the
I'm trying to add some share this javascript in between the head tags of
I have developed a blog application of sorts that I am trying to allow
I'm trying to share a repository between my Mac (laptop) and PC (desktop). There

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.