Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. DataColumn.Ordinal is -1 when running my app on one webbserver

DataColumn.Ordinal is -1 when running my app on one webbserver

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasewindows-adminhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    anderslundsgard
    wrote on last edited by
    #1

    I have a web application (ASP.NET 2.0) that is published on three servers (all working against one database). When I run the code below I got an ArgumentOutOfRangeException on just one of my webbservers. Very strange… All tips of where to start finding the error source are welcomed. I’m running IIS 6.0 and .NET 2.0. It fells like a IIS configuration of handling exceptions… or?

    public static DataRow Process(DataRow source0, DataRow source1, List<ProcessItemHandler> handlers)
    {
    DataRow target = source0.Table.NewRow();
    foreach (DataColumn column in source0.Table.Columns)
    {
    int n = column.Ordinal;
    ProcessItemHandler handler = handlers[n];
    …

    _____________________________ ...and justice for all

    P 1 Reply Last reply
    0
    • A anderslundsgard

      I have a web application (ASP.NET 2.0) that is published on three servers (all working against one database). When I run the code below I got an ArgumentOutOfRangeException on just one of my webbservers. Very strange… All tips of where to start finding the error source are welcomed. I’m running IIS 6.0 and .NET 2.0. It fells like a IIS configuration of handling exceptions… or?

      public static DataRow Process(DataRow source0, DataRow source1, List<ProcessItemHandler> handlers)
      {
      DataRow target = source0.Table.NewRow();
      foreach (DataColumn column in source0.Table.Columns)
      {
      int n = column.Ordinal;
      ProcessItemHandler handler = handlers[n];
      …

      _____________________________ ...and justice for all

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      At some point your handlers collection doesn't have an item at 'n'. Put some exception handling here and log your error in some fashion to allow you to figure out what the problem is.

      A 1 Reply Last reply
      0
      • P Paddy Boyd

        At some point your handlers collection doesn't have an item at 'n'. Put some exception handling here and log your error in some fashion to allow you to figure out what the problem is.

        A Offline
        A Offline
        anderslundsgard
        wrote on last edited by
        #3

        Found the problem. The handler-array was static and was initialized in two different ways depending on which page that was launched firs after an iisreset. Hopefully the problem is solved.

        _____________________________ ...and justice for all

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups