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 9155461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:35:54+00:00 2026-06-17T12:35:54+00:00

I have two .NET C# projects. They will be deployed under the same domain,

  • 0

I have two .NET C# projects. They will be deployed under the same domain, e.g. domain.com.

One project was created a few years also. It’s using .NET 4.0. Let’s call it MAIN_1. This project uses another external project to authenticate users, which is even older (.NET 3.5). Let’s call it AUTH_PROJ. I am creating a new project using MVC4 and .NET 4.5 in VS2012. Let’s call it MAIN_2. MAIN_1 and MAIN_2 will be deployed under the same domain (e.g. domain.com). My goal is to make user login in MAIN_1 and also authenticated in MAIN_2. I searched online and found this post http://www.codeproject.com/Articles/106439/Single-Sign-On-SSO-for-cross-domain-ASP-NET-applic very interesting and userful. I tested the single sign on by making some simple MVC projects in Visual Studio 2012 Professional:

  1. Project 1: .NET4.5 MVC4 internet project. => Website 1
  2. Project 2: same as Project 1. => Website 2
  3. Project 3: .NET 4 MVC3 internet project. => Website 3
  4. Project 4: same as Project 2. => Website 4

In this 4 projects, I added the same machine key and add domain=”localhost” to forms authentication in Web.config files.

Then I tested the single sign on.
I created an account in Website 1, logged in. I opened Website 2 and it’s already logged in. Cool! Same for Website 3 and 4.

But when I mixed different frameworks, nothing works.

I checked the browser cookie in firebug. .ASPXAUTH cookie stays there. But if the cookie is created by Project 1, and I debug Project 3, I can get all cookies exept .ASPXAUTH cookie. It seems that .ASPXAUTH depends on framework and although it’s visible in firefox, the other framework project can’t see it.

Can anyone help me figure out why .ASPXAUTH cookie becomes invisible in C# code and is there any other way to make single sign on work please? Thank you

  • 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-17T12:35:55+00:00Added an answer on June 17, 2026 at 12:35 pm

    In your 4.5 project, try setting this configuration switch in Web.config:

    <machineKey compatibilityMode="Framework20SP1" />
    

    4.5 and 4.0 use different encryption routines for the forms auth ticket. Setting the above switch in your 4.5 project should force it to use the same routines that 4.0 does. See http://blogs.msdn.com/b/webdev/archive/2012/10/23/cryptographic-improvements-in-asp-net-4-5-pt-2.aspx for more info.

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

Sidebar

Related Questions

I have two projects.One project is build in MVC asp.net and the other project
i have two .net web application and they ara running on different domain same
I have two projects in my solution   1- asp.net web project.   2-
I have two .ascx files in the same folder in an ASP.NET MVC project.
I have a ASP.NET MVC2 project in VS2010 that can be deployed in two
I have two ASP.NET 4.0 sites on Win2008R2 IIS7, e.g. demo1.site.domain.com and demo2.site.domain.com, and
I have a .NET 4.0 project with two modules that will communicate via WCF
I have two projects that contain extension methods. One project is implemented using C#
I have two different .Net projects, hosted on github. I would like to create
I have a Solution with several projects in it, including two asp.net mvc projects

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.