I am trying to access an asps website and download a file through a job in .NetCore.
The only issue is that this authentication token isn’t persistent.
How can I generate this value each time I want to run the job? So I have to install something in .NetCore for DotnetNuke?
Thanks in advance
DNN's basic authentication is designed to work in a standard browser context, so when you login, the response contains the cookie value and you send that cookie value back with each future request.
Some portions of DNN can handle basic authentication, however, that really isn't a supported pathway so your successes might be limited based on this behavior.
If you are looking to download a file, that is in "Secure" folder types, it might be best to implement an API using JWT or otherwise that you can call directly from your external application, rather than trying to override or otherwise mimic the DNN proceses.