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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:32:54+00:00 2026-05-23T22:32:54+00:00

I have found out by creating 2 new websites under IIS 7 that single

  • 0

I have found out by creating 2 new websites under IIS 7 that single sign-on authentication doesn’t work when run in different application pools. When i move the applications into the same pool i can login on one of them and be logged in on the other one. When i change application pool on one of them, i don’t get logged in on the second one.

Is there any settings that can be set in the machine.config file to allow them to share the same cookie over application pools?


Ex. 1:
proj1 (app pool .net 2)

proj2 (app pool .net 2)

= Single sign-on works, they are sharing the same auth cookie.


Ex. 2:
proj1 (app pool .net 2)

proj2 (app pool .net 4, integrated/classic)

= Single sign-on does not work, they are NOT sharing the same auth cookie.


Ex. 2:
proj1 (app pool .net 4, integrated/classic)

proj2 (app pool .net 4, integrated/classic)

= Single sign-on works, they are sharing the same auth cookie.


Original post

Latest update at the bottom

I have 2 projects, one is an asp.net webforms and the other is a mvc 3 project.

I followed this guide, see at the bottom, and i got it working on my computer. But when i upload it to the server, it doesn’t work anymore. The differences that i can think of is, 1) on the server we are using SSL, 2) the webforms project is using .net 2 and the MVC project is using .net 4 (integrated mode) and 3) I use IIS 7 on the server and i use VS 2008/2010 to test it on my local machine.

asp.net MVC 3 (.net 4)

<forms name=".ASPXAUTH" loginUrl="~/Home/Login" timeout="30" enableCrossAppRedirects="true" domain=".mydomain.com" ticketCompatibilityMode="Framework20" />

Webforms (.net 2)

<forms name=".ASPXAUTH" loginUrl="Default.aspx" defaultUrl="Default.aspx" timeout="30" domain=".mydomain.com" enableCrossAppRedirects="true" />

The funny part is, i uploaded a test.aspx page to both the Mvc (.net 4) and the webforms (.net) project and that just displays some trace.

Both projects have the same sessionid and .ASPXAUTH. On my localhost i can access the ASPXAUTH on the mvc project but i can’t access it on the server.

The projects run as subdomains, mvc.mydomain.com and webforms.mydomain.com.

Anyone got any ideas on how to solve this? I have full access to the IIS 7.0.

(I have also tried turning SSL on the server off but i still get the same result)

Guide for authentication sharing:
http://www.codeproject.com/KB/aspnet/SingleSignon.aspx

Updated
I also tried this: (webforms .net 2.0)

var ticket = new FormsAuthenticationTicket(1, "authtest", DateTime.Now, DateTime.Now.AddMinutes(30), false, login.Email);
var enc = FormsAuthentication.Encrypt(ticket);
var cookie = new HttpCookie("authcookie", enc) {Domain = ".mydomain.com"};
Response.Cookies.Add(cookie);

and in mvc 3 (.net 4)

FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(HttpContext.Request.Cookies["authcookie"].Value);
ViewBag.User = "User: " + ticket.Name;

This throws the following error: “Length of the data to decrypt is invalid.”

Updated 6th jul

Funny! When i add 2 new domains that runs under .net 2 it works perfectly. But when i change the application pool to .net 4 it stops working. Its like they aren’t compatible or i might be missing a setting somewhere

  • 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-23T22:32:55+00:00Added an answer on May 23, 2026 at 10:32 pm

    We could not find any ways of doing this so we had to convert our other project to use the .net 4 integrated app pool.

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

Sidebar

Related Questions

I have found out that I am doing WPF wrong and frustratingly must overhaul
I have recently found out that there exists a method called nth_element in the
I have recently found out that no argument constructor and multiple argument constructor cannnot
I found out that in order to open a Gmail compose screen you'd have
I have an interview tomorrow morning and just found out that I will also
PLEASE NOTE, I have found a work around which actually works out better for
I'm doing some fairly simple cross-platform TCP socket programming. I have unfortunately found out
I have found many similar posts and even tried to find out how to
Recently I have been learning about WMI and WQL. I found out the list
I have found myself designing a language for fun that is a cross between

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.