I' currently trying to execute code from the Community framework 2.4 on a scheduled job. But each time I run it I get an license exception due to the following.
ClubHandler handler = new ClubHandler() However, the constructor will execute this LicenseProvider.Validate(typeof(ClubHandler)); and this one will later try to read the httpcontext which isn't set since the scheduled job is running automaticly and not manually.
So, my question is, how can I run my code? Can I validate the license in some way from my scheduled job?
Error message from the log: 2008-11-13 00:00:48,279\t(null)\t3.1.2 Failed to execute job 296e01dc-b5cf-4e6b-bfd5-2291826a2073 System.NullReferenceException: Object reference not set to an instance of an object. at StarSuite.Core.Licensing.LicenseProvider.get_IsTrustedMode() at StarSuite.Core.Licensing.LicenseProvider.Validate(Type licensedType) at StarCommunity.Modules.Club.ClubHandler..ctor()
ClubHandler handler = new ClubHandler()
However, the constructor will execute this
LicenseProvider.Validate(typeof(ClubHandler));
and this one will later try to read the httpcontext which isn't set since the scheduled job is running automaticly and not manually.
So, my question is, how can I run my code? Can I validate the license in some way from my scheduled job?
Error message from the log:
2008-11-13 00:00:48,279\t(null)\t3.1.2 Failed to execute job 296e01dc-b5cf-4e6b-bfd5-2291826a2073
System.NullReferenceException: Object reference not set to an instance of an object.
at StarSuite.Core.Licensing.LicenseProvider.get_IsTrustedMode()
at StarSuite.Core.Licensing.LicenseProvider.Validate(Type licensedType)
at StarCommunity.Modules.Club.ClubHandler..ctor()