Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
A solution to this problem could be to fake a httpcontext. Here is a quick link from googling on the subject:
http://dotnetbutchering.blogspot.com/2008/08/net-how-to-simulate-httpcontext-cookies.html
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()