Password Protected Scheduled Task

Discussion in 'Hosting Services / Control Panel' started by Swellbuzz, Oct 13, 2016.

  1. I'm running a site that uses forms authentication, so I created a separate web application containing a subdirectory with the file I want to run for the Scheduled Task. It's almost operational, but there is something in the root web.config file that is disrupting the process (when I disable the root web.config file, it prompts for the password as expected). In the subdirectory's web.config file, the authentication is set to windows and basic authentication to true. What else from the root could be disrupting it? Thanks!!



    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>

    <system.web>
    <authentication mode="Windows" />
    </system.web>

    <system.webServer>
    <security>
    <authentication>
    <basicAuthentication enabled="true" />
    </authentication>
    </security>
    </system.webServer>


    <location path="combo.aspx">
    <system.web>
    <authorization>
    <deny users="?" />
    </authorization>
    </system.web>
    </location>



    <system.serviceModel>
    <behaviors>
    <serviceBehaviors>
    <behavior name="DefaultBehavior">
    <serviceCredentials>
    <userNameAuthentication userNamePasswordValidationMode="Windows"/>

    </serviceCredentials>
    </behavior>
    </serviceBehaviors>
    </behaviors>
    </system.serviceModel>

    </configuration>
     
  2. Ok, I solved this problem by altering the root/parent web.config with this code so the settings wouldn't be inherited by the subdirectory:
    <location path="." inheritInChildApplications="false">
    </location>
     
    mjp and RayH like this.

Share This Page