0

I have been trying to deploy django application using IIS but after following all the steps i am getting below error

<handler> scriptProcessor could not be found in <fastCGI> application configuration

I understand this error is due to incorrect path of scriptprocessor value, but value mentioned is correct. Please see below screenshot

Screenshot of wfastcgi-enable

Applied configuration changes to section "system.webServer/fastCgi" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
""c:\program files\python39\python.exe"|"c:\program files\python39\lib\site-packages\wfastcgi.py"" can now be used as a FastCGI script processor

Below is the value set in web.config file in wwwroot folder

<handlers>
  <add name="Python FastCGI" 
  path="*" 
  verb="*" 
  modules="FastCgiModule" 
  scriptProcessor="c:\program files\python39\python.exe|c:\program files\python39\lib\site-packages\wfastcgi.py"
  resourceType="Unspecified" 
  requireAccess="Script" />
</handlers>

Can somebody help why i am facing this error.

Ronak
  • 187
  • 2
  • 17
  • For information about "Configure Python web apps for IIS", you can refer to this link: https://learn.microsoft.com/en-us/visualstudio/python/configure-web-apps-for-iis-windows?view=vs-2019 – Ding Peng May 13 '21 at 06:28
  • I performed exact steps mentioned in https://learn.microsoft.com/en-us/visualstudio/python/configure-web-apps-for-iis-windows?view=vs-2019 still not working – Ronak May 13 '21 at 09:47

1 Answers1

0

Finally solved the problem!

The problem was with the value of scriptProcessor key. Path of scriptProcessor was having space and that was the problem error was being thrown.

I finally had to re-install python with path that was not having spaces in between like below and it worked properly.

scriptProcessor="c:\python39\python.exe|c:\python39\lib\site- 
packages\wfastcgi.py"
Ronak
  • 187
  • 2
  • 17