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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:28:50+00:00 2026-05-19T12:28:50+00:00

I have a .net webapplication with the following domains: www.domain.com sub.domain.com files.domain.com When a

  • 0

I have a .net webapplication with the following domains:
http://www.domain.com
sub.domain.com
files.domain.com

When a user is logged on to domain.com or sub.domain.com, I’d like them to share session state (i.e. be logged into both domains at once). This is possible to do by setting the domain on the session coookie to be “.domain.com”.
However, my problem is that the domain “files.domain.com” should not have session state due to security issues (xss attacks from user-made files hosted on that domain is an issue).

Is it possible in ASP.NET to use the same asp.net session id for these two domains, but not the third one?

Thanks in advance!

  • 1 1 Answer
  • 4 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-19T12:28:51+00:00Added an answer on May 19, 2026 at 12:28 pm

    Here are a couple of options that come to mind:

    #1 – Post your login request to both applications via a client side script. This will enable you to set cookies for both valid domains at the same time. This enables you to avoid the XSS issue that you are concerned about by creating cookies for the specific domains that you want to have your users authenticated on.

    #2 – Move your “unsecure” site to a different domain. For example: http://www.domain-files.com. With that option you could use a shared cookie to manage authentication.

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

Sidebar

Related Questions

I have following problem: I have to make a ASP.NET Webapplication with a two-row
We have a Asp.net webforms webapplication. The solution has the following structure: MySolution\ MySolution.Main\
In my ASP.NET WebApplication I have the following entry in my web.config: <pages controlRenderingCompatibilityVersion=3.5
I have the following scenario. I have created an ASP.NET web application (framework 3.5)
Background : I have a asp.net webapplication project that should contain a public and
I'm developing an ASP.NET forms webapplication using C#. I have a method which creates
i have a problem with session in my webapplication (asp.net mvc rc2). the application
I have developed a webapplication in both ASP.NET MVC and ASP.NET Webforms and i'm
I have build a webapplication using ASP.NET MVC and JQuery. On my local machine
i have two .net web application and they ara running on different domain same

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.