Nop-Templates.com wrote:
We get many of records of this error in the Log:
The remote server returned an error: (404) Not Found.
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()
Does anyone else has such an error in the Log?
I finally figured out why I got these errors in the Log.
I used the database from
demos.nop-templates.com on my local machine running on http://localhost:15536/.
The new scheduled task implementation is trying to make a request to demos.nop-templates/scheduletask/runtask but since it is still running on 3.90 it return not found error.
I believe the current implementation could cause some misunderstandings in the future.
A lot of store owners have testing and live environments for their websites and usually use the a copy of production database on the testing server.
They will never be able to run their scheduled tasks on the testing server (and eventually test them) as the TaskThread.Run() will make requests only to the production (live) website.
Also if the store owner does not enter the store url correctly (if they enter it at all) they will not have their scheduled tasks ever run. Actually the scheduled task will be run on a different machine and they will never know.
I am sure we will have a lot of support request from clients complaining their scheduled tasks are not running or having a lot of errors like these in the Log.
I know it is best to use the store url if for example several nopCommerce instances are running etc. but at least there should be more meaningful message in the log when the store url is different than the current store url i.e just like you have a warning about this in the Warnings page.
So instead of making a request to the store it will log a message like this "Scheduled task not run. Please make sure the Specified store URL matches this store URL".
Thanks,
Boyko