locked
IIS configuration error for python Django project RRS feed

  • Question

  • i configure python Django web application using IIS (using Fast CGI) on azure VM but getting this

    "HTTP error 500.0 internal server error An unknown Fast-CGI error occurred"

    i research on this error and also watch video on you-tube related to same error but i cant able to solve this error can any one have any idea how to solve this error thanks in advances 

    

    Friday, February 1, 2019 12:01 PM

Answers

  • thank you for your help everyone

    Hastik Patel

    • Marked as answer by Hastik Patel Friday, March 22, 2019 7:25 AM
    Friday, March 22, 2019 7:22 AM

All replies

  • Can you enable FREB logging and check what is being logged when you access the site ?

    -----------------------------------------------------------------------------------------------------------

    If you found this post helpful, please give it a "Helpful" vote. 

    Please remember to mark the replies as answers if they help.

    Friday, February 1, 2019 12:52 PM
  • hello i dont know how to do that can you guide me or tell me steps to follow for how to check log and everything. right now i am try to configuration python Django web application on IIS but i cant able to do that.

    my Email ID: hastikpatel786@gmail.com you can mail me steps to check logs thanks in advanced. 

    Monday, February 4, 2019 10:04 AM
  • Here is the link to enable FREB in IIS: https://docs.microsoft.com/en-us/iis/troubleshoot/using-failed-request-tracing/troubleshooting-failed-requests-using-tracing-in-iis#enable-failed-request-tracing

    When you enable, you capture status code from 200-500 so all the request will be logged. Then you can try accessing the site and check what is wrong by checking FREB traces. 

    Regards, 

    Msrini

    Monday, February 4, 2019 10:31 AM
  • thank you i try this method and tell you what is my log

    Tuesday, February 5, 2019 10:10 AM
  • this is showing me in logs

    #Software: Microsoft Internet Information Services 10.0
    #Version: 1.0
    #Date: 2019-02-06 04:46:54
    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
    2019-02-06 04:46:54 ::1 GET / - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/72.0.3626.81+Safari/537.36 - 500 0 267 275
    2019-02-06 04:46:54 ::1 GET /favicon.ico - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/72.0.3626.81+Safari/537.36 http://localhost/ 500 0 267 27

    Wednesday, February 6, 2019 6:17 AM
  • Any idea how to solve this error

    Wednesday, February 6, 2019 6:28 AM
  • I see there are no issue with the platform. The error 500 is something to do with your Application/code. Can you engage your Application team to fix this issue?

    Regards, 

    Msrini

    Wednesday, February 6, 2019 6:47 AM
  • yes its showing me Error 500.19 unknown fastcgi error and i google it for solution the answer is your script file misplace or wrong but i check that there nothing is misplace or wrong i also raised ticket to IIS support team where i found out that Microsoft(window) is not Support to IIS configuration of python-Django Application. so its Really issue with window not Supported to IIS configuration of python Django??  
    Friday, February 15, 2019 5:38 AM
  • I found this article : http://chrisberragan.com/articles/2014-03-19-installing-django-on-iis-7-5/

    Why is the config invalid?
    On the 500.19 error message, the Config Source shows the tag highlighted - this is because IIS requires the web.config works in a hierarchy from other parent config files and overriding needs to be explicitly set in a parent 

    Adding another blog with solution for 500.19 : https://blogs.msdn.microsoft.com/webtopics/2010/03/08/troubleshooting-http-500-19-errors-in-iis-7/

    Please check that article and let me know if that fixes your issue. 

    Regards, 

    Msrini


    Friday, February 15, 2019 7:17 AM
  • i will check and let you know about this thanks for your help

    Wednesday, February 20, 2019 4:18 AM
  • hello,

    the error with Wfastcgi modules unknown i check script process and other things but still this is same error any solution for this error thanks in advanced 

     

    Wednesday, February 20, 2019 9:25 AM
  • Hi Hastik, 

    Can you try to run your application without IIS?

    This will narrow down the issue whether it has something to do with the Application code or compatibility  issue with IIS. 

    Regards, 

    Msrini

    Monday, February 25, 2019 8:20 AM
  • hello msrini,

    the code run with IIS is perfectly fine there is no error or issue while running this is screenshot without error tool running fine. i think so this is compatibility issue with IIS so how can i solve that ?? 

     


    Hastik Patel

    Wednesday, February 27, 2019 7:16 AM
  • As stated by Support team, IIS doesn't support Django as such. We tried our level best fom our end. Can you please engage Django support?

    Regards, 

    Msrini

    Wednesday, February 27, 2019 8:38 AM
  • hello msrini,

    i will engage with Django support and let you know with update.


    Hastik Patel

    Wednesday, February 27, 2019 8:48 AM
  • Hello msrini,

    i reach out one of Django support and the told me yes it's possible via CGI layer. and i researching on that so i found out video as well as link how to use CGI for python-Django project on IIS. i try those thing before then i am getting that "internal server error 500.00 unknown WFASTCGI occurred" i think so this compatibility issue with window OS. can you please help me with this thank you

    here link of video and Document i found on internet

    https://docs.microsoft.com/en-us/previous-versions/azure/virtual-machines/windows/classic/python-django-web-app

    https://www.youtube.com/watch?v=CpFU16KrJcQ

    https://www.youtube.com/watch?v=cgTFrAwXeoI


    Hastik Patel

    Wednesday, February 27, 2019 11:36 AM
  • Hi Hastik, 

    Just wanted to check if you have any progress? I do see that you have raised a GitHub issue for the same questions. Let us know if you have any progress. 

    Regards, 

    Msrini

    Tuesday, March 12, 2019 6:38 AM
  • hello,

    i am getting still same error no progress

    regards,

    Hastik patel


    Hastik Patel

    Tuesday, March 12, 2019 7:00 AM
  • Hi Hastik, 

    Can you try deploying the same application in Web App?

    Can you make sure you configure the XML file whch is mentioned in the documentation : https://docs.microsoft.com/en-us/previous-versions/azure/virtual-machines/windows/classic/python-django-web-app#set-up-iis

    Regards, 

    Msrini

    Tuesday, March 12, 2019 7:15 AM
  • sure i will update you after doing same thing in document

    Hastik Patel

    Tuesday, March 12, 2019 7:36 AM
  • Getting same Error

    Hastik Patel

    Friday, March 15, 2019 11:55 AM
  • Hi Hastik, 

    If you see that Hello World program mentioned in the doc, it does work with IIS and Django. But your code doesn't. So, there is something wrong with the code which in throwing 500 Internal Server error. Can you engage your Application team to check what is causing this error?

    As you have been told by the support that they don't support Django, there is nothing much we can do at this moment. 

    Regards, 

    Msrini

    Friday, March 15, 2019 1:11 PM
  • Hello,

    thank you for your help can you please tell me where I go or whom I have to ask to solve this problem any idea?


    Hastik Patel

    Monday, March 18, 2019 4:23 AM
  • Hi Hastik. Based on the sample that does work and your code that does not, there appears to be something in your specific code that is causing the problem. Hard to say what that is just by an error message alone.

    I would suggest you post your code and the related error messages to stack overflow to see if any of the Django devs there might be able to help steer you in the right direction. 

    Also, IIS does not support Django so if you are looking to host on IIS then you will need to use something different rather than Django as it will not work. 

    Tuesday, March 19, 2019 5:36 PM
  • thank you for your help everyone

    Hastik Patel

    • Marked as answer by Hastik Patel Friday, March 22, 2019 7:25 AM
    Friday, March 22, 2019 7:22 AM