locked
Publishing to a subfolder - Attribute 'processPath' is required. RRS feed

  • Question

  • User-29703693 posted

    My asp.net core app loads fine when I publish to the website's root directory.  However, I would like to publish it to a "sandbox" subfolder.  When I try that, I get the error:

    Could not load configuration. Exception message: Attribute 'processPath' is required.

    Source: IIS AspNetCore Module V2

    My web.config file is: 

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <location path="." inheritInChildApplications="false">
        <system.webServer>
          <handlers>
            <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
          </handlers>
          <aspNetCore processPath="dotnet" arguments=".\CTM.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
        </system.webServer>
      </location>
    </configuration>

    Any idea how I can resolve this?  Thanks in advance.

    Friday, March 13, 2020 5:28 PM

Answers

  • User-29703693 posted

    I was able to figure it out by adding 

    app.UsePathBase("/sandbox");

    to my startup.cs file.  and within IIS 7.5 I right clicked on the sandbox folder and then "Add Application..."

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, March 13, 2020 7:24 PM