Reputation: 11
hi i am trying to deploy my python app on windows2012 server with iis . i follow the process of add application in website on specific folder than changing handler mapping settings in adding handler script putting python path in it. when i am trying to open it code show me text of app.py instead of running it.
only difference when i tried is that in his python code he started with #!iusr and i started directly have my python code. source where i tried https://www.youtube.com/watch?v=7whncKjSXK0
anyone have any clue thanks for help
Upvotes: 1
Views: 3233
Reputation: 12749
First, create python site for example mine is hello.py and place it under C:\pythonsite folder:
print('Content-Type: text/plain')
print('')
print('Hello, world!')
request path: *.py executable: C:\Python37-32\python.exe %s %s name:python
"C:\Python37-32\" is your python folder.
Note: make sure directory browsing is enabled and your python and site folder has iis_iusrs and iusr permission assigned with full control. you install iis CGI feature.
Upvotes: 2