I created a very simple Flask server on my Windows system (i’m not on windows server) using wfastcgi and manually configured the web.config file to be able to run it within the python venv environment. The server works correctly, but I noticed that the identity in the application pool is set to LocalSystem, which, as I understood, allows access to all operating system functionalities. Following some guides on the internet, I understood that the correct configuration to set would be to set the identity to ApplicationPoolIdentity in the application pool and create permission users IUSR and IIS_IUSRS.
I did all this, granted access to all subfolders and files of the project with all permissions. The problem is that if I try to start the server with these configurations, it doesn’t work, I get HTTP Error 500.0 – Internal Server Error. Could you help me understand how to solve the problem?
I would like to point out that the anonymous user is enabled. Detailed error information:
I would like to point out that the anonymous user is enabled. Detailed error information:
Module FastCgiModule
Notification ExecuteRequestHandler
Handler PythonHandler
Error Code 0x00000067
Requested URL http://localhost:5050/
Physical Path C:UserssimonDesktopserver_fasullo
Access Method Anonymous
Access User Anonymous
The web.config used:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="PythonHandler" path="*" verb="*" modules="FastCgiModule"
scriptProcessor="C:UserstestDesktopserver_fasullovenvScriptspython.exe|C:UserstestDesktopserver_fasullovenvLibsite-packageswfastcgi.py"
resourceType="Unspecified" requireAccess="Script"/>
</handlers>
</system.webServer>
<appSettings>
<add key="PYTHONPATH" value="C:UserstestDesktopserver_fasullo"/>
<add key="WSGI_HANDLER" value="app.app"/>
</appSettings>
</configuration>