views:

24

answers:

1

Hi...

I've developed a custom timer job using the SPJobDefinition class. The idea is to extend the existing Alert Me notifications, by allowing to send notifications to the members of a Role using the asp.net role provider framework.

After a lot of trial and error, I'm beginning to think it might not even be possible to use the RoleManager from a Custom Timer Job?

No matter which web-application my job is installed on, I keep receiving the "The Role Manager feature has not been enabled." exception.

Can anyone tell me a way of traversing roles through a custom timer job?

+1  A: 

That's because your timerjob runs in the owstimer.exe process, so it doesn't read your web.config file. You could try to add a file owstimer.exe.config in 12hive\bin (a config file, just like a web.config file) and specify your role and membership providers there, but I'm not sure if it will work.

Tom Vervoort
I figured it would be something like that... I just learned about these custom timer jobs, and when I read they were "installed" on a web-app, I just assumed they'd be sharing settings and configs with the web-app. I'll try your suggestion
Dynde
Excellent - the app.config worked :)
Dynde