Looking at applicationHost.config, it has:

          <add segment="web.config" />
          <add segment="bin" />
          <add segment="App_code" />
          <add segment="App_GlobalResources" />
          <add segment="App_LocalResources" />
          <add segment="App_WebReferences" />
          <add segment="App_Data" />
          <add segment="App_Browsers" />

`bin` is the only one that has a reasonable chance of causing problem in a Node app. So instead of this fancier logic, I think we could simply remove the bin segment unconditionally for Node apps when we generate web.config. It really only makes sense for ASP.NET. If users have more complex needs, they can always bring their own web.config file.