SharePoint Blog - René Hézser

Anmelden  RSS Feed RSS Feed
Startet die Suche


Cancel the activation of a SPFeature  

Dec 282008

If you have ever created a SPFeatureReceiver class, you might have noticed, that there is no “FeatureActivating”. So what do you do to cancel an activation of your feature?

Just throw an exception within FeatureActivated. This will cancel the activation process, and not activate the feature.

throw new SPException("The feature could not be activated.");
Technorati Tags: ,
 
Posted by René Hézser | 0  Comments | Trackback Url  | 0  Links to this post | Bookmark this post with:        
Tags: Development, SharePoint, Solution
Technorati Tags: , ,

Links to this post

Comments

Name *:
URL:
Email:
Kommentar:


CAPTCHA Image Validation