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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:17:50+00:00 2026-05-24T11:17:50+00:00

I am facing a weird problem. My web application throws error Value to add

  • 0

I am facing a weird problem. My web application throws error “Value to add was out of range Parameter name :value “. Now this is not every time I run the program.Sometimes shows error and sometimes runs without problems (no changes done).stack traces given below the error is not clear (at least for me). Anybody faced this kind of issue ?

Error Details

Value to add was out of range.
Parameter name: value
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Value to add was out of range.
Parameter name: value

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 


[ArgumentOutOfRangeException: Value to add was out of range.
Parameter name: value]
   System.DateTime.Add(Double value, Int32 scale) +9388319
   System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +8837703
   System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125
   System.Web.Compilation.BuildManager.CompileCodeDirectories() +319
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +248

[HttpException (0x80004005): Value to add was out of range.
Parameter name: value]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +62
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +421
   System.Web.Compilation.BuildManager.CallAppInitializeMethod() +31
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +605

[HttpException (0x80004005): Value to add was out of range.
Parameter name: value]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9013676
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1 

enter image description here

  • 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-24T11:17:51+00:00Added an answer on May 24, 2026 at 11:17 am

    Just guesses: as the exception seems to be thrown from the code that you do not control, it is not your code that causes the error. However, that could be your system settings. For example, for some weird reason System.DateTime.Add(Double value, Int32 scale) is called with such parameters, that, as MSDN states,

    The resulting DateTime is less than MinValue or greater than MaxValue.

    Is it ever possible that the time on your computer is now set to some incredibly high value? Close to 23:59:59.9999999, December 31, 9999, for instance. Or maybe low value, close to 00:00:00.0000000, January 1, 0001. So the compiler for some reasons picks up the current date and needs to add some time span to it, which causes your error.

    Just a wild guess, but maybe…

    UPDATE

    The code of the System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly method can be found here. In the code there is a line

    DateTime waitLimit = DateTime.UtcNow.AddMilliseconds(3000); 
    

    That’s the only place that could throw such exception (if the version I am looking at is the same as your environment). So it gives more votes for weird time set on your computer.

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

Sidebar

Related Questions

I'm facing a weird problem developing a web application as compatible as possible with
I am facing very weird problem, i made an web application for my client,
I am facing this weird problem. The WebApp I'm debugging right now, is invoking
this time, I'm facing a really weird problem. I've the following code: $xml =
I am facing a weird problem with a text field on my page. This
I am facing this very weird problem, I have created a custom UITableViewCell on
I'm new to jQuery and am facing now a weird problem. I succeeded to
I'm facing a very weird problem. This is map.h: #define MAP_WIDTH 256 #define MAP_HEIGHT
I facing a weird problem here. I already have a simple try-out for jquery
I am working on my first application for iPhone and I'm facing this weird

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.