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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:51:07+00:00 2026-05-12T08:51:07+00:00

My web app exposes a few services (WCF) and I need to load an

  • 0

My web app exposes a few services (WCF) and I need to load an XML file and ‘store’ it a static variable visible to the entire AppDomain. That variable needs to be queried and updated from either a service or a page.

The thing is, I load that variable in the Application_Start (Global.asax.cs) but when a service request arrives the variable is empty and needs to be ‘reloaded’, and that happens with every service (3), so I end up with 3 instances of a static variable.

How can I ensure that all my applications are running on the same AppDomain? what am I doing wrong?

VS2008 SP1 on Win7 RTM box

  • 1 1 Answer
  • 1 View
  • 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-12T08:51:08+00:00Added an answer on May 12, 2026 at 8:51 am

    Ok, so after a bit of research I found the solution. I’ll posting the solution here and many links that helped me find it.

    WCF services and ASPX pages DO run on the same AppDomain when running side-by-side (default), my problem was that the AppDomain was being recycled because my app was creating a folder below the root folder of my app. When I moved that creation away from the app itself, the AppDomain quited restarting so I always keep my static values.

    Here’s a list of interesting post I read and helped my find the solution:

    • WCF Services and ASP.NET
    • Recycling (AppDomains, not cans)
    • Application vs. AppDomain
    • Managing Worker Processes and AppDomains in IIS 7.0 with WMI
    • Deleting ASP.NET 2.0 Application Sub-Directories Shuts Down the AppDomain
    • ASP.NET v2.0 – AppDomain recycles, more common than before
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web-application. As part of this, I need users of the app
I'm looking at building a simple web app that will expose an API that
I have a huge web app that is having issues with memory leak in
In my (PHP) web app, I have a part of my site that keeps
we're developing a web app to cover all aspects of a printing company from
I've got a web app that sends out emails in response to a user-initaited
In my web app, I submit some form fields with jQuery's $.getJSON() method. I
In a web-app I'm writing, the user is supposed to enter the path in
I'm writing a web app that points to external links. I'm looking to create
I am developing a web app which requires a username and password to be

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.