Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Object reference not set error on Activating features

$
0
0

Experts-

I have a strange problem while activating webapplication scope feature using SharePoint object model. This is throwing error inconsistently. Here is the snippet.

SPFarm.Local.FeatureDefinitions.Add("MyFeature\\feature.xml", new Guid(stringFeatureID), true);


SPWebApplication webapplication=getthewebapplication();

webapplication.Features.Add(new Guid(stringFeatureID), true); --- ERROR HERE

Getting object reference error. No clues found on debugging and ULS logs.

Thoughts please?


Bala


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>