pythonflaskiisweb-configwfastcgi

HTTP Error 500.0 - Internal Server Error Flask on iis Error Code 0x00000067


I'm trying to deploy a app on IIS using the IIS is on my personal Windows 10 PC. I followed all the steps in this documentation it showed me this Error with Code 0x00000067

here is my web config file

<?xml version="1.0"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="Flask CGI"
           path="*"
           verb="*"
           modules="FastCgiModule"
           scriptProcessor="c:\users\marwa\desktop\recommendationsystem2\env\scripts\python.exe|c:\users\marwa\desktop\recommendationsystem2\env\lib\site-packages\wfastcgi.py"
           resourceType="Unspecified"
           requireAccess="Script"/>
           
    </handlers>
  </system.webServer>
<appSettings>
  <add key="WSGI_HANDLER" value="app.app" />
  <add key="PYTHONPATH" value="C:\Users\marwa\Desktop\RecommendationSystem2" />

</appSettings>
</configuration>

update It suddenly gave a different error after restarting my computer which you can find in this image


Solution

  • You can clearly find the cause of the error based on its error message, and you can find the error code in the official documentation, and you can try the solutions, please refer to the Scenario 7 in this document.

    There are usually a few more lines in that error response that points to the exact line in the config file (and hence the locked section) that has the problem. You will either have to unlock that section or not use it in your application’s web.config file.

    Or manually change value from "Deny" to "Allow" for below settings in %windir%\system32\inetsrv\config\applicationHost.config

    Another way is checking your windows features.

    1. Click "Start button"
    2. in the search box, enter "Turn windows features on or off"
    3. in the features window, Click: "Internet Information Services"
    4. Click: "World Wide Web Services"
    5. Click: "Application Development Features"
    6. Check (enable) the features. Check all options but CGI.