Open ClayMDMI opened 6 years ago
If using a virtual environment, the Scripts path of the environment most be in the system path, otherwise the webservice will not be able to execute the program. If this is already the case, you could anyway try to use the system-wide Python temporarily instead of the virtual env, just to check if the virtual environment is the problem.
Also, I haven't tested with Django 2 yet (last tested with 1.11), though I don't really think that this is the problem.
First of all, thanks for replying so fast!
I ran it on my full installation of Python as well to the same result. Out of curiosity, why do you not think that Django 2 is the source of the problem?
Sorry, right now I don't have another idea. About Django 2 - I don't think it is a problem, justed wanted to mention that I haven't tested it, so I can't be sure. Using Django 1.11 with Python 3.6 and IIS 10 has worked for me without problems.
Update - I tested this with a new default Django 1.11.0 project and it failed. I also tested on Python 2.7 just for thoroughness, but no dice.
Another thing I noticed, the installation guide says
the
winfcgi_install
command provides numerous options. To list them, type:D:\sites\mydjangoapp> python help winfcgi_install
and
Take the fcgi.py file and copy it in the
management\commands
directory of one of your project applications so that themanage.py help fcgi
command returns you: [Picture of help options]
But both of those commands return nothing for me, they are unknown commands. Could it be a clue?
Sorry for the late response - I didn't really have time to look into this.
The python help winfcgi_install
was obviously a typo , it shall read python manage.py help winfcgi_install
- I corrected this in the README.
As for the second one - I haven't done this (don't have a system to try this at the moment), but I see no reason why it shouldn't work. You have to call it from the web root of your application, where you have copied the file, of course - but I guess you did this. I may try this later and check if it works.
I have this same issue. My setup is the following:
Django: v1.11.15 Python: v3.6.6 IIS: v10 django-windows-tools: 0.2.1 I use a virtual environment.
Details: I have not copied the fcgi.py file, and I cannot find it in the documentation. However I noticed the following:
python manage.py help winfcgi_install
fails with an exception (reported in #29).fcgi_180910_170314_2428.log
. These files are however all empty (0 kb).python manage.py winfcgi
seems to works, but I don't know how to fake a request here. However I noticed that my application print output is also output here. Could this be what goes wrong, or does communication between IIS and the application happen in another way?Futhermore, I would like to know if there is a way that I can see what exactly caused the failed request? Or perhaps run a test request from the commandline?
whoever got this right, please help. I have the same problem.
I am also having the same problem.
I have been getting an error with FastCGI when I try to use the django-windows-tool to configure my Django Project to run on IIS. When I run
python manage.py winfcgi_install
while in my virtual environment, a newweb.config
file, a new app pool, a new FastCGI application, and a new web site all appear as intended. I bind the website to a new port, then change the app pool Identity from "ApplicationPoolIdentity" to "LocalSystem". However, after navigating to the website I get an error.Obviously, this error message isn't super helpful. After a suggestion on another issue here, I tried adding lines to my
web.config
file shown below to have it print more information, but it doesn't change the result.I saw some people talking about needing to grant the app pool permission to the project directory, so I followed the instructions HERE (performed on the root folder, changed permissions for all folders inside as well) but nothing changed.
Any ideas on next steps? Could this be an issue with my virtual environment? I very much appreciate any help, as well as the fact that this tool just exists in the first place!
More info: Django v2.1 Anaconda v5.2 Python v3.6.3 IIS v10