4

While trying to run "wfastcgi-enable" to deploy my Django code on IIS, it's showing this error:

ERROR ( message:New application object missing required attributes. Cannot add duplicate collection entry of type 'application' with combined key attributes 'fullPath, arguments' respectively set to 'C:\Users\paritosh\AppData\Local\Programs\Python\Python39\python.exe, C:\Users\paritosh\AppData\Local\Programs\Python\Python39\lib\site-packages\wfastcgi.py'
. )
An error occurred running the command:

['C:\\Windows\\system32\\inetsrv\\appcmd.exe', 'set', 'config', '/section:system.webServer/fastCGI', "/+[fullPath='C:\\Users\\paritosh\\AppData\\Local\\Programs\\Python\\Python39\\python.exe', arguments='C:\\Users\\paritosh\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\wfastcgi.py', signalBeforeTerminateSeconds='30']"]

Ensure your user has sufficient privileges and try again.

I tried running CMD in Administrator Mode as well, it didn't work.

  • 1
    I'm not sure how you deploy Django application on IIS. Maybe some steps didn't set correct perssion to app pool or IUSR. You can refer to [these full steps](https://stackoverflow.com/a/67850853/14162739) to check which step was incorrect. – Bruce Zhang Oct 01 '21 at 06:23
  • Thanks a lot, I solved the issue, actually I needed to allow certain hosts in settings file. – Kushagra A. Nalwaya Oct 02 '21 at 12:48

3 Answers3

5
wfastcgi-disable

and execute this

wfastcgi-enable
Peter Csala
  • 17,736
  • 16
  • 35
  • 75
Selvadurai S
  • 51
  • 1
  • 2
0

Can you please tell what changes you made in the settings file? Sorry, I had to post this as an answer as I dont have commenting rights yet.

Chinmay Datar
  • 77
  • 3
  • 13
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 26 '21 at 07:28
  • In settings.py change ALLOWED_HOSTS = [''] to ALLOWED_HOSTS = ['*']. Instead of * you can also use any specific URL if you're trying to host there. Check if it works – Kushagra A. Nalwaya Oct 26 '21 at 08:22
  • Didn't work for me but thanks. – Chinmay Datar Oct 26 '21 at 09:42
0

It is possible that it requires more permissions.

To solve this you have to open your terminal in administration mode

You can do this [Click right] on your mouse

ThomasG2201
  • 676
  • 6
  • 25