code generating ArgumentOutOfRangeException with Error Message as "Length cannot be"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sanghamitra das
    New Member
    • Oct 2007
    • 3

    code generating ArgumentOutOfRangeException with Error Message as "Length cannot be"

    We have developed a web application in which we are using login user(as a array structure) in session variable using HttpContext for some purpose.
    The session is availabe in the same project throughout. But, when a class in the dll of the project tries to look up the session object, ArgumentOutOfRa ngeException is raised.

    The problem is that this happens only once in a while after publishing the website. When the IIS is restarted, everything runs smoothly again. How do I reduce the chance of error?


    Please revert back with some idea because we have to solve this issue asp.
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    It sounds like you are just occasionally putting too much on the variable without clearing it. Explain again how you are using the data, and I might be able to suggest another alternative.

    Jared

    Comment

    Working...