Scheduled task do not work, Nopcommerce 4.0

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
In my case it was Tls12 in Nop.Engine.cs line: 148

//most of API providers require TLS 1.2 nowadays
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;//.Tls12;

I changed that with Tls and Scheduled Tasks - Sending Email stared triggering.
5 years ago
Hi all,

I managed to trace the problem down to the real issue and that was inside my task logic.
To pinpoint down to all issues, the first thing one must check is whether you enter the task logic or not.
I managed to do so by using the LoggerService that is available in NopCommerce.

So I started with writing to my log at the first rule of logic. This made clear I was entering the task.
After that I added logging at several places in my task logic which enabled me to track the issue. In my case I was trying to download a file via a url using a webrequest and this caused an error because dowloading that file was somehow blocked. Then I realised the file should not be downloaded because it was on the same server. This way my issue was resolved.

For working with the logger just add a private readonly Logging.ILogger _logger variable and perform constructor injection to ensure it is resolved at runtime.
Then use the logger to log something at the first line of your tasks execute method.

I hope you will trace down your issue quickly!
5 years ago
Take a look at my post in this thread...

https://www.nopcommerce.com/boards/t/51158/version-40-registration-email-not-send-the-request-was-aborted-could-not-create-ssltls-secure-channel.aspx
5 years ago
What did the trick for me was using the https URL as store URL
5 years ago
Note:
First : changing url works fine for me.
** After changing the store URL ** you should restart your application via Setting icon in top-right corner in admin panel and select "Restart application".

You can see this option in the following image.

5 years ago
i tried following steps to resolve this error but still the error is there.
1) no www. in store url.
2) edited http to https in store url.
3) changed ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; to Tls also.
4) Clear cache and also restarted the application.
5) Enbaled SSL for every page also.


but, still the error is getting logged in log table. Please help me out from this. Thanks in advance.
5 years ago
rathod.anmol wrote:
i tried following steps to resolve this error but still the error is there.
1) no www. in store url.
2) edited http to https in store url.
3) changed ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; to Tls also.
4) Clear cache and also restarted the application.
5) Enbaled SSL for every page also.


but, still the error is getting logged in log table. Please help me out from this. Thanks in advance.





I solved the problem.

###
cloudflare.com- Crypto-
Always use HTTPS
Redirect all requests with scheme “http” to “https”. This applies to all http requests to the zone.###
An email was sent when "Always use HTTPS" was turned off.
5 years ago
ha yes, Https in store url resolved my issue thank you very much.
4 years ago
I have my test site on azure.  http://MyStore.azurewebsites.net

I am getting the same 404 error. Any guesses how I need to configure the url?
4 years ago
Also check this post regards making sure the host url is accessible internally to the webserver
https://www.nopcommerce.com/boards/topic/78057/all-scheduled-tasks-fail-when-running-automatically-but-not-manually

I had edit my hosts file and added the local IP
10.0.0.150  v42demo.testing.com.au
then ping v42demo.testing.com.au

Pinging v42demo.testing.com.au [10.0.0.150] with 32 bytes of data:
Reply from 10.0.0.150: bytes=32 time<1ms TTL=128
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.