Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've built a SharePoint user control (not a web part) and am deploying it via Solutions, Features, etc.

It's a commercial component and I want to be able to store license information once it's registered. I've got all the licensing stuff down and working, however, I am trying to find a "global" (i.e. farm level) place to store the information (so it works on multi-server farms).

This is intended to be a commercial component so I have no control over security policies, application pool accounts, etc. I need it to work without admins needing to reconfigure their farms.

I've considered:

  • Web.config - best option so far, but have read that Windows UAC can interfere and changes may not always be applied.

  • Hierarchical Object Store - Several security gotchas - Namely app pool needs access to Config database (which many environments won't allow)

  • Root site property bag - Possible. I can update all the Root Sites Properties at the time of registration, but what happens when new web apps are created? User has to register component for each web app?

  • Registry, file system - Not persisted across servers

  • Custom DB - Seems like a lot of places for this to fail.

  • Custom ASMX page sitting in _admin folder. Unfortunately, users need access to CA to access this page and the control will be running under the context of a general user.

I know other commercial vendors are doing it somehow.

Any ideas?

share|improve this question
    
Windows UAC should be disabled on a web frontend and shouldn't interfere with web.config changes. –  James Love Jul 26 '11 at 19:50

2 Answers 2

The following assumes a farm admin is installing and registering the component...put an XML fragment in the farm property bag (...SPFarm.Properties).

May not work you base on how it is deployed/used, but it's a reasonable place to start.

If you want to provide more info on how it is deployed and who deploys and/or uses it I may be able to give you a more implementation-specific approach.

share|improve this answer
    
Farm Admin is need for deploy (it's a standard WSP). The control is a .NET user control and is displayed on various pages within the site. The control needs to read some "global" configuration to see if it is licensed. Right now, I have some custom pages deployed to Central Admin that handles the registration and activation. The problem is where do I store the registration information so the control can read it. I can easily have the registration page enumerate all the web apps and store this license info in each site collection property bag, however what happens with new WebApps or SCs? –  Rob Jul 26 '11 at 19:52
    
If you don't want to go the Farm property bag approach you can write it to the site collection and just use feature stapling...basically hook the SPWeb create event, check to see if the newly created site is the rootweb (i.e. it's a new site collection), and write out the license info. –  Rob D'Oria Jul 26 '11 at 20:05

You could store licence files int he 12hive/SharePoint Root, your application would then have farm-wide access via the /_layouts virtual file system path.

You would, however, need a separate licence registration application to register the control's licence. What this could do, is generate a licence WSP for your environment which installs into the farm and propagates the licence file into the 12hive/SPRoot.

Maybe not ideal, but an idea.

(I'm swimming around ideas for doing this very thing myself, this might be good to be opened up as a community wiki?, as there's more than one way to skin a cat [as always in SharePoint])

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.