Skip to content

Spa Services running only react pages ? #56976

@itsmegopi

Description

@itsmegopi

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

We have a web application which runs on .NET 8 (recently we migrated from 5 to 8).
Now the team is planning to build new screens in ReactTS and merge these screens with the existing .NET 8 web application. So, it won't impact on the current customers. We also have a future plan to migrate the existing .NET web screens to React TS in phase wise manner

We are doing a POC with .NET Web APP and ReactTS sample apps we tried different articles and approaches to run .NET application and ReactTS application on the Same domain and port number.
Example .NET 8 web app is running on https://localhost:44341 and trying to run ReactTS also on same port and they both reside in same solution.

My solution look like
image

Do we have any documentation for this?

We are using

Startup we added like
app.UseSpa(spa => { spa.Options.SourcePath = "ClientApp"; spa.UseReactDevelopmentServer("start"); });

We are using " Microsoft.AspNetCore.SpaServices.Extensions " package.

Expected Behavior

We trying to run .NET 8 Web APP and ReactTS on same domain and port simply we are mixing .NET 8 and ReactTS so few screens will run on ReactTS and few screesn will run on .NET 8.

Our POC here

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

8

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templates

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions