0

I have an API which gives a list of details, i would like to export the result of this API in to xml format and this export functionality should run once in a day. There is no UI to export this functionality. Its a kind of backend task which will run on a particular time every day.

I am using C# and Asp.net Core. Can some one suggest me to achieve the same.

1 Answers1

0

You have multiple problems to solve.

  1. Scheduling - you will need a dedicated service to execute the service. This can be done in azure timer triggers https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-timer?tabs=csharp

  2. Creating an XML file - On your server, once you fetch the xml contents, you will need to write the file to the response. You need to set the response content type Valid content-type for XML, HTML and XHTML documents You will also need to write the contents of the xml file to the output C# Asp.net write file to client

Zakk Diaz
  • 1,063
  • 10
  • 15