Share via

Root problems in cshtml .NET 9

Marco Grella 0 Reputation points
2025-03-24T21:51:08.7933333+00:00

I've a server app with C# and Razor pages.

In order to integrate with a shibboleth server, I exposed a root through a cshtml page (not authenticated) that then redirects to another razor page.

I upgraded the app from .NET7 to .NET 9 and the page can no longer be reached (HTTP error 404).

@page "/entryPointcshtml"

@namespace ...

@using I....

@using Microsoft.AspNetCore.DataProtection

@inject IDataProtectionProvider _dataProtectionProvider

*@addTagHelper , Microsoft.AspNetCore.Mvc.TagHelpers

<h1>Redirect in progress</h1>

The page simply reads the headers and from the request and then redirects.

However, the server is no longer able to expose the root at runtime. Should I force something in the program.cs?

Any other options?

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.