having an issue with iis5 when I move code from iis6

Discussion in 'ASP .Net' started by =?Utf-8?B?Q2hyaXM=?=, Oct 11, 2004.

  1. Ok, I have the below function in my web app.

    public void advalue_set_tbs_m (DirectoryEntry ad_user, string field, TextBox
    tb)

    { //adds value to AD if value is > 0, if not, sets it to null

    if (tb.Text.Length > 0)
    {
    ad_user.Properties[field].Clear();
    ad_user.Properties[field].Add(tb.Text);
    }
    else
    {
    ad_user.Properties[field].Clear();
    }
    }

    It works fine on my IIS 6 web server. I upgraded my IIS5 server to ASP.Net,
    then moved the app over.

    I am now getting the below error

    System.InvalidOperationException: Operation is not valid due to the current
    state of the object

    on this line

    ad_user.Properties[field].Add(tb.Text);

    anyone have any idea whats going on ??

    Chris
     
    =?Utf-8?B?Q2hyaXM=?=, Oct 11, 2004
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Henry
    Replies:
    1
    Views:
    1,256
    Kevin Spencer
    Jun 25, 2003
  2. =?Utf-8?B?QWw=?=
    Replies:
    4
    Views:
    2,074
    Jeff Dillon
    Aug 26, 2004
  3. Mark B
    Replies:
    8
    Views:
    2,154
    Mark B
    Jul 28, 2005
  4. Dariusz Tomon

    ASP and ASPNET on IIS5 and IIS6

    Dariusz Tomon, Mar 16, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    534
    Dariusz Tomon
    Mar 16, 2006
  5. Brian Campbell
    Replies:
    0
    Views:
    2,436
    Brian Campbell
    May 5, 2004
  6. Terry Strachan

    moved from iis5 to iis6

    Terry Strachan, Jun 6, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    1,912
    Terry Strachan
    Jun 7, 2006
  7. Brian

    IIS5-like verb filter in IIS6

    Brian, Oct 16, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    350
    Brian
    Oct 16, 2006
  8. Luwk
    Replies:
    1
    Views:
    815
    Banty
    Nov 22, 2006
Loading...