We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

The <fastCgi> element configuration levelsRSS

10 replies

Last post Mar 25, 2021 09:45 AM by skvoboo

  • The <fastCgi> element configuration levels

    Mar 04, 2021 03:16 AM|skvoboo|LINK

    The documentation states:


    You can configure the <fastCgi> element at the server level in the ApplicationHost.config file or at the site level, at the application level, or at the directory level in a Web.config file.


    Is it possible to configure the FastCGI application inside the web.config file after changing the allowDefinition attribute of the fastCgi section from AppHostOnly to Everywhere and unlocking the fastCgi section?

  • Re: The <fastCgi> element configuration levels

    Mar 04, 2021 06:55 AM|Brucz|LINK

    Hi skvoboo,

    Yes, you can do this.

    You can unlock this restriction in IIS Manager to make FastCGI can be set in web.config.

    In the connections tree(in IIS), go to your server node and then to your website.

    1. For the website, in the right window you will see configuration editor under Management.
    2. Double click on the configuration editor.
    3. In the window that opens, on top you will find a drop down for sections. Choose "system.webServer/handlers" from the drop down.
    4. On the right side, there is another drop down. Choose "ApplicationHost.Config "
    5. On the right most pane, you will find "Unlock Section" under "Section" heading. Click on that.

    Then you can add any handler at level of site.

    Best regards,

    Brucz

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
  • Re: The <fastCgi> element configuration levels

    Mar 04, 2021 07:10 AM|skvoboo|LINK

    Brucz

    Then you can add any handler at level of site.

    The handlers section was unlocked earlier. I can add a handler on site level in the web.config file without problems.

    My question about ability to configure system.webServer/fastCgi/application element in the web.config file.

  • Re: The <fastCgi> element configuration levels

    Mar 05, 2021 03:50 AM|Brucz|LINK

    Hi skvoboo,

    I did a test to configure fastcgi section in web.config, the fact is it failed. So it only can be configured on applicationhost.config.

    The issue has been proved in another thread.

    Best regards,

    Brucz

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
  • Re: The <fastCgi> element configuration levels

    Mar 05, 2021 04:39 AM|skvoboo|LINK

    Brucz

    So it only can be configured on applicationhost.config.

    Related question.

    Is it possible to configure the FastCGI application at the site level inside the applicationHost.config file after changing the allowDefinition attribute of the fastCgi section from AppHostOnly to MachineToApplication and unlocking the <fastCgi> and <handlers> sections?

    Site location in the applicationHost.config file:

    <location path="Default Web Site">
        <system.webServer>
            <fastCgi>
                <application fullPath="C:\php\php-cgi.exe" arguments="-d name=value" />
            </fastCgi>
        </system.webServer>
    </location>

    Handler in the site web.config file:

    <configuration>
        <system.webServer>
            <handlers>
                <add name="FastCGI-PHP" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\php\php-cgi.exe|-d name=value" resourceType="File" />
            </handlers>
        </system.webServer>
    </configuration>
  • Re: The <fastCgi> element configuration levels

    Mar 25, 2021 08:28 AM|samwu|LINK

    Hi skvoboo,

    skvoboo

    Is it possible to configure the FastCGI application at the site level inside the applicationHost.config file after changing the allowDefinition attribute of the fastCgi section from AppHostOnly to MachineToApplication and unlocking the <fastCgi> and <handlers> sections?

    This is impossible, as far as i know, you can only configure FastCGI in applicationhost.config.

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
  • Re: The <fastCgi> element configuration levels

    Mar 25, 2021 08:49 AM|skvoboo|LINK

    samwu

    as far as i know, you can only configure FastCGI in applicationhost.config.

    Hi samwu,

    I am asking about the ability to configure FastCGI settings in the applicationHost.config file, but at the site level.

    Is it possible or not?

  • Re: The <fastCgi> element configuration levels

    Mar 25, 2021 09:18 AM|samwu|LINK

    Hi skvoboo,

    skvoboo

    I am asking about the ability to configure FastCGI settings in the applicationHost.config file, but at the site level.

    Is it possible or not?

    This is impossible.

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
  • Re: The <fastCgi> element configuration levels

    Mar 25, 2021 09:24 AM|skvoboo|LINK

    Thank you all for your participation.

    Last question.

    Is this an issue in the FastCGI Module or in the documentation?

  • Re: The <fastCgi> element configuration levels

    Mar 25, 2021 09:40 AM|samwu|LINK

    Hi skvoboo,

    skvoboo

    Is this an issue in the FastCGI Module or in the documentation?

    What do you mean? can you explain it?

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
  • Re: The <fastCgi> element configuration levels

    Mar 25, 2021 09:45 AM|skvoboo|LINK

    samwu

    What do you mean? can you explain it?

    The documentation states:


    You can configure the <fastCgi> element at the server level in the ApplicationHost.config file or at the site level, at the application level, or at the directory level in a Web.config file.


    At the server level - OK

    At the site level, at the application level, or at the directory level - FAILED