Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Razor Class Library is not routed properly when referenced from a WebForms project #3196

Closed
TPIvan opened this issue Jun 5, 2018 · 4 comments

Comments

@TPIvan
Copy link

TPIvan commented Jun 5, 2018

When I create a Razor Class Library (Visual Studio 2017 + Core 2.1 Template) and reference it from an ASP.NET Core Web Application Project the Page1 created by the template is available on the address /MyFeature/Page1 . When I do the same with an ASP.NET Web Application (.NET Framework) the page is not available on the address (HTTP 404).

@pranavkm
Copy link
Contributor

pranavkm commented Jun 5, 2018

@TPIvan are you attempting to reference the class library from a Mvc 5 \ WebForms project? That wouldn't work. Razor Class Library requires ASP.NET Core to run.

@TPIvan
Copy link
Author

TPIvan commented Jun 5, 2018

@pranavkm
Yes this is exactly what I am doing. It seems to be possible to work with classes defined in the Razor Pages project, but not the pages.
The ability to work with Rasor Page library would easify a step by step transition from Net/Webforms to core. So the only way of connection both technologies is to have two separate processes (virtual directories)?

@pranavkm
Copy link
Contributor

So the only way of connection both technologies is to have two separate processes (virtual directories)?

Yes, that would likely be the model to go with. cc @davidfowl in case you have anything further to add.

@davidfowl
Copy link
Member

That’s right. There’s no way to host one in the other. It needs to be run side by side in different processes

ryanbrandenburg pushed a commit that referenced this issue Nov 27, 2018
…-master

[automated] Merge branch 'release/2.2' => 'master'
@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants