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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:07:26+00:00 2026-06-04T11:07:26+00:00

Well…I feel absolutely stupid. Here’s why: I have been using some library functions I

  • 0

Well…I feel absolutely stupid. Here’s why:

I have been using some library functions I wrote 2 years ago. Buried a few levels deep, I was using these functions to help build the path I wanted:

System.Web.HttpContext.Current.Request.ApplicationPath
System.Web.HttpContext.Current.Server.MapPath

Instead of using this:

HttpRuntime.AppDomainAppPath

System.Web.HttpContext.Current will be certainly null because there is no http context. And, of course, no exceptions were being thrown because I was trapping and ignoring them.

You don’t know how many hours I was staring at my project wondering what the heck was wrong!

Please forgive me for wasting everyine’s time. This is so embarassing!!!

  • 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-04T11:07:27+00:00Added an answer on June 4, 2026 at 11:07 am

    It is discouraged to spawn threads in ASP.NET applications. I know it can technically be done, but there are lots of gotchas that you have to account for. The recommended best practice is to create a Windows service to run your background tasks. Then your ASP.NET app can issue requests to the service, which handles them in the background.

    Updated with references

    From comments on multi threading on asp.net:

    One warning about using background processing on ASP.NET sites. IIS can recycle the application at any given moment and will kill any running background thread while doing this. So there is no guarantee that your thread pool threads will run succesfully. If that’s a problem, it is better to use a Windows service to do the background processing.

    Additionally, SO user Mr. Disappointment goes into detail here, saying:

    Windows services are designed to be long running, and if something goes wrong you’ve generally got more to worry about than your individual service.

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

Sidebar

Related Questions

Well I'm doing some Java - C integration, and throught C library werid type
Well im here because i have a problem. i have code that was created
Well, I have to revive a question that was answered here before. I've made
Well, this is my first post here and really enjoying the site. I have
Well I have a view of this type of hierarchy Main View (having some
Well here is my problem: I have a table with an iframe in the
Well, I didn't really know how to call this... I have been surfing PayPal's
Well, having decided to get to know some of the basic functions in R
Well, here's what I have to do. I need to trim the whitespaces in
Well I am using the following code to take any old image into a

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.