Link to home
Start Free TrialLog in
Avatar of Jordan_WM
Jordan_WM

asked on

Installing Flask app on IIS7

Has anyone have any experiecen installing a flask app on IIS 7, there seems to be no clear solution in how to do this. I  need to install it on IIS 7 due to some of the constraints that my organization places on us
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

it is an add-on to python, so you have to install python first (use the Microsoft's web platform installer)
you will need to first install WFastCGI from web platform installer. Refer the below article this might help you:

http://netdot.co/2015/03/09/flask-on-iis/
Avatar of Jordan_WM
Jordan_WM

ASKER

Sorry correction it is IIS8, I have followed the article but I seem to get this error which I am not to sure about

Error occurred while reading WSGI handler: Traceback (most recent call last): File "C:\inetpub\wwwroot\mysite\wfastcgi.py", line 711, in main env, handler = read_wsgi_handler(response.physical_path) File "C:\inetpub\wwwroot\mysite\wfastcgi.py", line 568, in read_wsgi_handler return env, get_wsgi_handler(handler_name) File "C:\inetpub\wwwroot\mysite\wfastcgi.py", line 551, in get_wsgi_handler raise ValueError('"%s" could not be imported' % handler_name) ValueError: "app.app" could not be imported StdOut: StdErr:
What is the full errro is it something like access denied?
This was the full error I was getting from my Chrome browser, I am suspecting that it might be an access issue but I am not sure,  the site is not in inetpub but in another location

Error occurred while reading WSGI handler:

Traceback (most recent call last):
  File "C:\mysite\wfastcgi.py", line 711, in main
    env, handler = read_wsgi_handler(response.physical_path)
  File "C:\mysite\wfastcgi.py", line 568, in read_wsgi_handler
    return env, get_wsgi_handler(handler_name)
  File "C:\mysite\wfastcgi.py", line 551, in get_wsgi_handler
    raise ValueError('"%s" could not be imported' % handler_name)
ValueError: "my_app.wsgi_app()" could not be imported


StdOut:

StdErr:
check the permissions on the path are correct or not
Did u install the Flask as an Administrator?
ASKER CERTIFIED SOLUTION
Avatar of Systech Admin
Systech Admin
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I checked the permissions they are correct, python was installed from the Web Platform Installer, I did add IUSER and IIS_USER permissons to the python27 folder. I am not sure what is going with trying to get this run I am still relatively new IIS
Thanks looks like it was a permission issue