Home > Enterprise >  DotNetNuke Authentication cookie
DotNetNuke Authentication cookie

Time:06-29

I am trying to access an asps website and download a file through a job in .NetCore.

  • When I try to log in with the password and user name it is failing.
  • I made the same request through postman and it added an authentication cookie in with DotNetNuke and a value.
  • In my code when I take this value postman gave me and add a header add header(cookie, .DotNetNuke=PostmanValue) the job works.

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

CodePudding user response:

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.

  • Related