SharePoint feature troubleshooting

I was getting an object reference error when activating my feature. A couple of things I need to remember:

1. Run code with elevated privileges
2. Installing and activating the feature via stsadm will not like SPContext. I didn’t actually use that this time, but read it in my research of the problem and I’m sure I’ll do it at some point. The proper method is to reference the properties.partent.site. This can be an SPSite or an SPWeb depending on how you have coded the feature. Check if it is null.
3. Check the folder permissions on you feature folder in the 12 hive.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s