Hi.
I'm trying to make an item for use in the Scheduler. I understand that to do that, I must install my custom class into the GAC (Global Assembly Cache). To do this, my assembly needs to be "strongly named." I'm using C# Express 2005 and I think I set my assembly to be strong by signing it in the project's properties. Now when I build the project, it gives an error because DotNetNuke was not signed!
This prompted me to get the full code for DNN 4.4.1 (the version I'm using) and I tried to sign that project. I'm getting various errors doing that, because some of the assemblys DotNetNuke.Library references aren't signed and I don't have the source code. I'm guessing that after these 3 hours I've spent, there must be an easier way. Any ideas?
I'm about ready to forget about the scheduler alltogether, but I'd rather not since I want to be able to use some of DNN's functionality in my code.
Thanks.
I found out how to do the code here:
http://www.wwwcoder.com/tabid/68/type/art/parentid/224/site/6401/default.aspx
Here's the code if it even helps:
namespace MySite
{
class ScheduledTaskTest : DotNetNuke.Services.Scheduling.SchedulerClient
{
ScheduledTaskTest(DotNetNuke.Services.Scheduling.ScheduleHistoryItem objScheduleHistoryItem)
{
this.ScheduleHistoryItem = objScheduleHistoryItem;
}
public override void DoWork()
{
try
{
//do database stuff to see what emails there are
//send an email about it
DotNetNuke.Services.Mail.Mail.SendMail(...);
}
catch(Exception ex)
{
this.ScheduleHistoryItem.Succeeded = false;
this.ScheduleHistoryItem.AddLogNote("The Email failed. " + ex.ToString());
this.Errored(ref ex);
}
}
}
}