When I host my web API on IIS, the Python script does not execute as expected. However, the entire workflow functions correctly during local development and debugging in Visual Studio.
What I Have Tried: Followed this guide to configure IIS.(https://www.server-world.info/en/note?os=Windows_Server_2022&p=iis&f=12) Checked the permissions and ensured that the application pool identity has the necessary permissions to run the Python script. Verified the Python script works independently when run from the command line on the server. Added logging to capture any errors, but the logs don't show any obvious issues.
Expected Behavior: The Python script should execute and return the output to the .NET Web API when the application is hosted on IIS, just as it does during local development.