Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Help!

 

I have a web application (VB.net codebehind) that has been working on my test server for ages.

 

Now, I had to do a little maintenance on it for the customer, and I now cannot log on to the site! It uses Integrated Windows authentication.

 

I have had the authentication page working since the site was installed. It pulls all sorts of information, including group memberships.

 

The area that appears to be failing is where I am attempting to get all the members of two particular groups.

 

Here's the code:

 

Progress = "SalesGroup-Start<br>"
 objGroup = GetObject("LDAP://CN=Sales,OU=IKON 
 Project,DC=ikontest,DC=dom")
 Progress += "SalesGroup-Step 1<br>"
 objOwners = GetObject("LDAP://CN=Owners,OU=IKON 
 Project,DC=ikontest,DC=dom")
 
 Progress += "SalesGroup-Step 2<br>"
 For Each strUser In objGroup.Member
   Progress += "SalesGroup-Step 2-sub<br>"
   objUser = GetObject("LDAP://" & strUser)
   ReDim Preserve arrNames(intSize)
   arrNames(intSize) = objUser.CN
   intSize = intSize + 1
 Next
 
 Try
   Progress += "SalesGroup-Step 3<br>"
   For Each strUser In objOwners.Member
	Progress += "SalesGroup-Step 3-sub<br>"
	objUser = GetObject("LDAP://" & strUser)
	ReDim Preserve arrNames(intSize)
	arrNames(intSize) = objUser.CN
	intSize = intSize + 1
   Next
 
   Progress += "SalesGroup-Step 4<br>"
 Catch ex As Exception
   Throw New Exception("Error getting Owners group. " & ex.Message & "<br>" & Progress & "<br>")
 End Try
       

 

 

Here's the output I get from that code:

 

Error authenticating user. Error getting Owners group. Cannot create ActiveX component.

SalesGroup-Start

SalesGroup-Step 1

SalesGroup-Step 2

SalesGroup-Step 2-sub

SalesGroup-Step 2-sub

SalesGroup-Step 2-sub

SalesGroup-Step 2-sub

SalesGroup-Step 3

SalesGroup-Step 3-sub

 

Whic should be correct. One member of the Owner's group, and four members in the Sales group.

 

Any ideas? Like I said, this has been working for over a year, and I can't think of any changes I've made to my Virtual Machine, let alone any changes that would interfere with this code!

 

Help!!!

The three most important things in life: God, your family, and the Green Bay Packers -- Not necessarily in that order.

Winning is not a sometime thing. You don't win once in a while, you don't do things right once in a while, you do them right all the time. Winning is a habit. Unfortunately, so is losing.

-- Vincent T. Lombardi
Posted

My bad!

 

Thanks for the views, and thinking on this.

 

It turns out that it had been so long since I worked on this project that I forgot that I had to comment out the secion on getting the members of the Owners group for use on my virtual server. This section of code works fine on their production server.

 

Sorry for using up your time!

 

Kahuna

The three most important things in life: God, your family, and the Green Bay Packers -- Not necessarily in that order.

Winning is not a sometime thing. You don't win once in a while, you don't do things right once in a while, you do them right all the time. Winning is a habit. Unfortunately, so is losing.

-- Vincent T. Lombardi

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...