Question

We are developing a custom module for SharePoint. The custom module is based upon SmartPart which means we have created UserControls. There was a problem with SmartPart deployment method as it requried to have a UserControls folder on web application root which we handled with a SharePoint Web Application Feature.

This custom module also required a separate database. We could setup the database manually but we also want to automate the database deployment and setup procedure.

Thanks to Alex. We decided to create an Application page where we are taking the following parameters:

  • Database Server
  • Database Name
  • Authentication Mode

Behalf of above provided information, we update the web.config with a connectionString. We are working on creating a database. After this we'll almost done.

The question I want to ask here is: The Application page we have how can we show this on Feature activation and when this custom module database successfully created we set the feature activated otherwise it will remain deactivate?

Thanks.

Was it helpful?

Solution

you cannot redirect to an application page when a feature is activated (what would happen if it is activated using STSADM for example or through feature dependencies...).

An alternative approach is to add a Web Part to the default page in the site that contains the configuration options or even better a delegate control that redirect the user to the configuration page if the site is not configured. (I would go for the second one...)

You can also add a link in Sites Settings to your configuration page using Custom Actions.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top