Add a new .net core project to your existing solution.

Add a NuGet package reference to Yarp.ReverseProxy.

<ItemGroup> 
 <PackageReference Include="Yarp.ReverseProxy" />
</ItemGroup>

Configure the startup middleware by adding the following entries:

builder.Services.AddReverseProxy()
    .LoadFromConfig(builder.Configuration.GetSection("ReverseProxy"));

app.MapReverseProxy();

After registering the middleware you can enter the appsettings.json configuration.

{
 "Logging": {
   "LogLevel": {
     "Default": "Information",
     "Microsoft": "Warning",
     "Microsoft.Hosting.Lifetime": "Information"
   }
 },
 "AllowedHosts": "*",
 "ReverseProxy": {
   "Routes": {
     "route1" : {
       "ClusterId": "cluster1",
       "Order" : 1, 
       "Match": {
         "Path": "{**catch-all}"
       },
       "Transforms": [
          {
            "PathRemovePrefix": "/SubFolderToRemove"
          }
        ]
     }
   },
   "Clusters": {
     "cluster1": {
       "Destinations": {
         "destination1": {
           "Address": "https://repetti.net/SubFolderToRemove"
         }
       }
     }
   }
 }
}

You will want to update the “Address” field above to point to the site you want to reverse proxy.

You can also remove or update the “Transforms” section above if you do not proxy to a subfolder.

Configure your web forms app to start at the same time as your .net core app.

References

https://microsoft.github.io/reverse-proxy/articles/getting-started.html