Django - IIS deployment - scriptProcessor could not be found

2.7k Views Asked by At

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.

1

There are 1 best solutions below

0
On BEST ANSWER

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"