title: How can I run React in Development mode with .NetCore in IIS?
body: <p>I've used the Visual Studio template for .NetCore/React web app.  By default, it runs in Development mode using IIS Express.  However, if I set up a site in IIS, and a launch profile, I get an error in the browser:</p>
  
  <blockquote>
    <p>AggregateException: One or more errors occurred. (One or more errors
    occurred. (The NPM script 'start' exited without indicating that the
    create-react-app server was listening for requests. The error output
    was: Error: EPERM: operation not permitted, mkdir
    'C:\Windows\system32\config\systemprofile\AppData\Roaming\npm'</p>
  </blockquote>
  
  <p>My launchSettings.json has the following for the IIS profile:</p>
  
  <pre><code>"IIS": {
        "commandName": "IIS",
        "launchBrowser": true,
        "launchUrl": "http://localhost",
        "environmentVariables": {
          "ASPNETCORE_ENVIRONMENT": "Development"
        }
      }
  </code></pre>
  
  <p>From the error, it looks like it may be a permission issue that I need to have the IIS app pool running under, but I can't find any documentation that tells me anything about that.</p>
  
  <p>What am I missing?  Again, this is an otherwise unmodified project from the template.  The Startup.cs is running React as would be expected with:</p>
  
  <pre><code>app.UseSpa(spa =&gt;
  {
     spa.Options.SourcePath = "ClientApp";
  
     if (env.IsDevelopment())
        { spa.UseReactDevelopmentServer(npmScript: "start"); }
  });
  </code></pre>