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. Advertising

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,060
    Kevin Spencer
    Jun 25, 2003
  2. =?Utf-8?B?QWw=?=
    Replies:
    4
    Views:
    1,889
    Jeff Dillon
    Aug 26, 2004
  3. Mark B
    Replies:
    8
    Views:
    1,870
    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:
    420
    Dariusz Tomon
    Mar 16, 2006
  5. Luwk
    Replies:
    1
    Views:
    663
    Banty
    Nov 22, 2006
Loading...

Share This Page