Nop 4.0 Send Email Task doesn't work

2 years ago
Hello,
in my website send email schedule task doesn't work.
If I click on "run now" It works fine.
In the register every minute I have this error:

Log level: Error
Short message: Remote server error: (404) Not Found.
Full message: System.Net.WebException: Remote server error: (404) Not Found.
   in System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data)
   in System.Net.WebClient.UploadValues(String address, NameValueCollection data)
   in Nop.Services.Tasks.TaskThread.Run()
IP address: (empty)  
Customer: (empty)  
Page URL: (empty)
Referrer URL: (empty)  

In store configuration the url and secure url of website is set correctly
Can you please help me?
Thanks!!!!!!!
1 year ago
Hi nicolabiondo,

I think you should probably need to make sure send e-mail works perfectly !

Try to send test email fromhttp://admin-demo.nopcommerce.com/Admin/EmailAccount/Edit/1

Userid [email protected]
Pass.  admin

Then You can figure out where exactly it's having issues.
1 year ago
My send test mail work fine.
But also work fine If I go in System => Schedule task and click to "Run now" in "send emails" task.
It's also the schedule work that doesn't work.
Thanks
Bye
Nicola
1 year ago
nicolabiondo wrote:
My send test mail work fine.
But also work fine If I go in System => Schedule task and click to "Run now" in "send emails" task.
It's also the schedule work that doesn't work.
Thanks
Bye
Nicola


Hi Nicola,

If you have recently changed your email settings in the backend then try Restarting the Application.
Also, is there in anything in the logs that might point you in the right direction?

Regards

Craig
1 year ago
@Nicola

What is your IIS environment?  Local or hosted?
1 year ago
c_mayers wrote:
My send test mail work fine.
But also work fine If I go in System => Schedule task and click to "Run now" in "send emails" task.
It's also the schedule work that doesn't work.
Thanks
Bye
Nicola

Hi Nicola,

If you have recently changed your email settings in the backend then try Restarting the Application.
Also, is there in anything in the logs that might point you in the right direction?

Regards

Craig



The only log that I have is what I wrote in the first post. I restart the application many times
Thanks
1 year ago
New York wrote:
@Nicola

What is your IIS environment?  Local or hosted?



Local
1 year ago
nicolabiondo wrote:
My send test mail work fine.
But also work fine If I go in System => Schedule task and click to "Run now" in "send emails" task.
It's also the schedule work that doesn't work.
Thanks
Bye
Nicola

Hi Nicola,

If you have recently changed your email settings in the backend then try Restarting the Application.
Also, is there in anything in the logs that might point you in the right direction?

Regards

Craig


The only log that I have is what I wrote in the first post. I restart the application many times
Thanks


If you have the source code version of nopCommerce, you could run it in DEBUG mode to try an identify what is going on. Failing that I would suggest re-installing if possible as something doesn't seem right.

Regards

Craig
1 year ago
Note this in the 4.00 release notes:

.... Schedule tasks are rewritten to be run using HTTP requests (not in background)

If you can debug/step-trough the code, you may get more insight into what's going on.
(Or, try installing nopC on your local PC to see what happens)
1 year ago
I'm having the same problem in v4.0. None of the active scheduled tasks are running most importantly the 'Send emails' task which is causing one customer some grief with online orders. I'm running the application on Azure.

Log level  
Error
Short message  
Error 404. The requested page (/scheduletask/runtask) was not found
Full message  
IP address  
104.45.83.43
Customer  [email protected]
Page URL  
https://www.bwydlyn.co.uk/scheduletask/runtask
Referrer URL  
Created on  
7/19/2018 3:47:26 PM



Log level  
Error
Short message  
The remote server returned an error: (404) Not Found.
Full message  
System.Net.WebException: The remote server returned an error: (404) Not Found.
   at System.Net.WebClient.UploadValues(Uri address, String method, NameValueCollection data)
   at System.Net.WebClient.UploadValues(String address, NameValueCollection data)
   at Nop.Services.Tasks.TaskThread.Run()
IP address  
Customer  
Page URL  
Referrer URL  
Created on  
7/19/2018 3:47:27 PM