title: How to fix 500.1002 error in Azure?
body: <p>We have 500.1001 or 500.1002 errors after success building our app. We tried to bundle our app to root and to public - error 500. We tried to correct iisnode.yml parameters (maxNamedPipeConnectionRetry and namedPipeConnectionRetryDelay). Our app always on in server.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p>
    </p>
  
  <pre><code>&lt;webSocket enabled="false" /&gt;
  
  &lt;handlers&gt;
    &lt;add name="iisnode" path="/public/server.bundle.js" verb="*" modules="iisnode"/&gt;
  &lt;/handlers&gt;
  
  &lt;rewrite&gt;
    &lt;rules&gt;
      &lt;rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true"&gt;
        &lt;match url="^server.bundle.js\/debug[\/]?" /&gt;
      &lt;/rule&gt;
  
      &lt;rule name="StaticContent"&gt;
        &lt;action type="Rewrite" url="public{REQUEST_URI}"/&gt;
      &lt;/rule&gt;
  
      &lt;rule name="DynamicContent"&gt;
        &lt;conditions&gt;
          &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/&gt;
        &lt;/conditions&gt;
        &lt;action type="Rewrite" url="/public/server.bundle.js"/&gt;
      &lt;/rule&gt;
    &lt;/rules&gt;
  &lt;/rewrite&gt;
  
  &lt;security&gt;
    &lt;requestFiltering&gt;
      &lt;hiddenSegments&gt;
        &lt;remove segment="bin"/&gt;
      &lt;/hiddenSegments&gt;
    &lt;/requestFiltering&gt;
  &lt;/security&gt;
  
  &lt;httpErrors existingResponse="PassThrough" /&gt;
  </code></pre>
  
  <p>
  </p>