0

We are migrating an ASP.NET Webforms application to ASP.NET Core using the incremental update approach with YARP. The project runs within VS with the Core app configured to find the RemoteApp at http://localhost:7001, while the Core app itself runs at http://localhost:7000.

We have configured both sites in IIS and they kind of work; however, routing is not functioning properly. We must set up the .NET Core site as a web application in a subdirectory under the root, for example, https://example.com/sub1/sub2/myapp. Also, the .NET Core web application on the public site should act as a proxy for the ASP.NET Webforms site.

Our IIS setup has a default site listening on port 443 with subdirectories 1 and 2, and three other sites running on different ports serving the ASP.NET Webforms site:

- Default Site (port 443) - public port
    - sub dir 1
        - sub dir 2
            - web application1 (.NET core app)
            - web application2 (.NET core app)
            - web application3 (.NET core app)

We also have websites running on different ports running the ASP.NET Webforms site, which are running at the root directory:

  • Default site2 (port 7000) - not public port
  • Default site3 (port 7001) - not public port
  • Default site4 (port 7002) - not public port

Our Core site appsetting.json file contains the following configuration:

"ReverseProxy": {
    "Routes": {
        "fallbackRoute": {
            "ClusterId": "fallbackCluster",
            "Order": "1",
            "Match": {
                "Path": "{**catch-all}"
            }
        }
    },
    "Clusters": {
        "fallbackCluster": {
            "Destinations": {
                "fallbackApp": {
                    "Address": "http://localhost:7000"
                }
            }
        }
    }
}

All frameworks and .NET Core Web bundles are installed in IIS. However, under this configuration, YARP does not function properly.

Can anyone suggest a solution?

0 Answers0