Logo 
Search:

MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Adding Users using OM -MOSS

  Asked By: Colin    Date: Mar 24    Category: MOSS    Views: 1110

When I try to add users to a top level site using Spweb.users.add method i am
getting an error "operation is not valid due to current state of the object".

If any one has the solution pls send me the solution

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Latisha Schneider     Answered On: Mar 24

I have checked the WSS SDK and I can see that there is no method
called users  in SPWeb class, instead Users is a property which is
used for retreiving information about users who are explicitly added
to a given site.
Please refer to the SDK for more information....

 
Answer #2    Answered By: Nora Maxwell     Answered On: Mar 24

Yes your right. But Spweb.users will return a Spusers collection object. in
that there is a method  add. using this method we can add users  to the website.

I have resolved the problem. Actually the problem is with spcontext object. So
I used SpMembershipprovider class and solved the problem.

 
Didn't find what you were looking for? Find more on Adding Users using OM -MOSS Or get search suggestion and latest updates.




Tagged: