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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:12:40+00:00 2026-06-03T08:12:40+00:00

I am currently converting a Windows Phone 7 application to its web counterpart. The

  • 0

I am currently converting a Windows Phone 7 application to its web counterpart. The application uses a big main thread from which the data is gathered, and for the moment I have just copied and pasted it as is (just a standard thread operation), in my ASP.NET MVC controller.

Sync _Sync = new Sync();
_Sync.StartSync();

The tasks work OK, but because the thread makes use of global data set from the cookies, issues arise when accessing the page with 2 different usernames. For example, if I login with “user1” in Firefox and then try to login in Chrome with another user (say “user2”), then it will automatically change the async data gathered for the first user; meaning that I will always see data pulled out from the last user logged in (regardless of the fact that I was just logged in in Firefox with another user, initially), and not each others’ separate data.

In other words, the thread doesn’t start separately for each individual user. How could I fix this behavior?

  • 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-03T08:12:41+00:00Added an answer on June 3, 2026 at 8:12 am

    Static fields and properties are shared across threads and should generally not be used to store data that pertains to a specific user or web request.

    One of the following suggestions should fix your threading issues and keep your user data separate.

    • Create an instance of the Sync class for each request and remove any static fields / properties from the class.
    • Add a method to the Sync class that returns an instance of the data for a specific user instead of storing the data in static fields / properties.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently converting a Windows Form application to ios. The windows implementation uses
I am currently converting what was a Console Application into a Windows Form application.
I'm building an application that connects to SQL Server 2005. It currently uses Windows
I'm currently converting a test class which extended the Spring class AbstractTransactionalSpringContextTests to Spring
I'm currently building a converter in C#. My program is converting from/to Decimal, Binary
I have an application that I'm converting to Symfony/Doctrine. It currently stores a serialized
Windows Phone 7.1/7.5/Mango Silverlight App. Coming from here: Need clarification on using audio on
I have a C application I'm converting from a set of hand coded Makefiles
I have an application, currently written in C#, which can take a Base64-encoded string
I am developing a windows mobile application in which I want to debug the

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.