I am trying to read an xml-feed into a database on a specific time with cron jobs. Everything is working fine (the cron job calls the page and the xml-script starts running and reading into the database) except that i dont want someone else to be able to run the script by visiting this page. Therefore I have been looking at setting up a password-protected page for this script, but there is not a lot of information about how to do this with cron jobs and asp.net.
It seems to be so much easier with php (use the htaccess-file and send the username and password with the cron-job url like http://username:password@yoursite.com/cron ). Is it possible to do this with asp.net sites?
I have to use cron job since my web hosting provider don't have windows task scheduler.
Thanks, Axel
您可以在特定于目录的web.config中使用通过保护的URL
Two points come to my mind
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.