Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ronish Potiah 19 posts 171 karma points
    Jun 13, 2016 @ 12:32
    Ronish Potiah
    0

    Scheduled Tasks Not Triggering

    Hello, I have created a scheduled task in umbracoSettings.config which requires an aspx page to load.

    <task log="true" alias="test60" interval="60" url="http://local.flarestudio.com/umbraco/tasks/BrandAdminMailNotification.aspx"/>
    

    My question is how does umbraco knows which method to call in the code behind of the aspx page?

    Currently my code lies in page load, but this does not trigger anything. It is logged though as test60 has been called with response: True

    Also, I have an ssl problem in logs.

     public class BrandAdminMailNotification : Umbraco.Web.UI.Pages.UmbracoEnsuredPage
    {
        private EmailService EmailService => new EmailService();
    
        private UmbracoHelper UmbracoHelper => new UmbracoHelper(UmbracoContext.Current);
    
        protected void Page_Load(object sender, EventArgs e)
        {
            var msg = new IdentityMessage
            {
                Destination = "[email protected]",
                Subject = "Batch Test",
                Body = "Batch Test"
            };
    
            EmailService.Send(msg);
        }
    }
    

    Any help would be appreciated.

  • Ismail Mayat 4511 posts 10091 karma points MVP 2x admin c-trib
    Jun 13, 2016 @ 13:49
    Ismail Mayat
    0

    What is the ssl problem in the log?

    Regards

    Ismail

  • Ronish Potiah 19 posts 171 karma points
    Jun 14, 2016 @ 07:39
    Ronish Potiah
    0

    Thanks for your reply Ismail. Here is the log without https:

    Failed (at "http://local.flarestudio.com/umbraco"). System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure. at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar) --- End of inner exception stack trace --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Umbraco.Web.Scheduling.ScheduledPublishing.<PerformRunAsync>d__5.MoveNext() 
    

    However the response is true: test60 has been called with response: True

    When I used https, I got the same error but the response is false: test60 has been called with response: False

  • Ismail Mayat 4511 posts 10091 karma points MVP 2x admin c-trib
    Jun 14, 2016 @ 09:33
    Ismail Mayat
    0

    Ronish,

    You got firewall in place? Also while being logged into umbraco are you able to in another tab hit the url of the task does it run?

    Regards

    Ismail

  • Ronish Potiah 19 posts 171 karma points
    Jun 14, 2016 @ 10:07
    Ronish Potiah
    0

    Yes, I am able to hit the url directly and in doing so the task does run.

    Thanks.

Please Sign in or register to post replies

Write your reply to:

Draft