views:

30

answers:

1

I'm developing a web part for MOSS 2007. The web part is being deployed to a web application which utilizes forms-based authentication, and role/membership providers to control users.

The membership table has been edited to include addition user info (I am aware, that this isn't the best way to handle additional user, i.e. profiles etc., however, this is a requirement from another department).

Since my web part needs to access this information, I was thinking of implementing a custom membership provider.

So far I've followed: http://msdn.microsoft.com/en-us/library/6tc47t75.aspx and I've got my custom membership class, and a very stripped down membershipprovider-class.

But how do I enable/use this membership provider in my web part?

I've tried creating a simple web.config in the "WebPartCode" folder of my solution, next to my webpart code file, with connection string and membership provider tags.

But I don't even really know how to build/reference/use the membership provider itself, so I don't know what else I need to do.

I've built a C# class library project with the two classes (membershipprovider and custom membershipuser) and compiled it and installed it in the global assembly cache - is this correct? and how do I access them from here?

Hope someone can help

A: 

You already have FBA set up and working, so you shouldn't need to make any changes in Central Administration for your web application. However, for your reference, the UI settings are found in Central Administration under 'Application Management' - 'Authentication Providers.'

You will need to install the DLLs for your membership provider either in the GAC on every Sharepoint server in your farm or in the bin directory for your web application on every Sharepoint server in your farm. I would recommend packaging your DLLs up in a solution in order to deploy them.

FBA then needs to be configured in the web.config for your Sharepoint IIS site (e.g., web application). This can be found at C:\Inetpub\wwwroot\wss\VirtualDirectories\[Name of Web App]\web.config, and this needs to be configured for every Sharepoint server in your farm.

Please note that by installing your custom membership provider on a particular web application, you will necessarily remove the existing membership provider. This may cause problems for existing users unless your custom membership provider uses the same member database (e.g., usernames/passwords) that the current membership provider uses.

Tim
Tim Larson