0

I am having a custom http module and a custom membership and role provider for my sharepoint website. I have a scenario wherein I want to add user to sharepoint website.

  1. I am able to add it from custom membership provider(by EnsureUser method) but I need to pass website Uri to create SPSite object. Can I get SPSite's Uri when sharepoint service calls ValidateUser method.

  2. I am trying to add user by EnsureUser method from custom module where I can get SPSite's Url in HttpContext.Current.Request.URL (which is null in membership provider) but EnsureUser method throws exception.

Any idea on how to add user to sharepoint site programatically from either custom http module or from custom membership provider(by getting SPSite's Url).?

Regards, VD

Vishal
  • 127
  • 9

1 Answers1

0

It worked with EnsureUser only. It was a problem in my code.

Vishal
  • 127
  • 9