Moving Website from .net 4.8 to .net 6 - mod rewrite of redirection of aspx pages to cshtml

Grant Wilson 0 Reputation points
2023-05-24T18:07:20.55+00:00

Moving Website from .net 4.8 to .net 6 -

I have webpages with next to no c# written for .net 4.8 and the webpages end in .aspx

I want move to .net 6.0 with Blazor and the webpages will end in cshtml.

how do I redirect to the new cshtml pages using a 301 redirect?

Can I redirect all webpages using mod rewrite for redirection of aspx pages to cshtml

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,410 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. XuDong Peng-MSFT 10,341 Reputation points Microsoft Vendor
    2023-05-25T05:43:48.15+00:00

    Hi @Grant Wilson,

    Can I redirect all webpages using mod rewrite for redirection of aspx pages to cshtml

    Do you want to redirect from one application to another? If you mean using both aspx and cshtml in the same application. Then this cannot be achieved.

    If you mean that you want to upgrade an ASP.NET Framework Web Forms app to ASP.NET Core MVC, then you need the .NET Upgrade Assistant. For more details, please refer to this doc: https://learn.microsoft.com/en-us/aspnet/core/migration/web_forms?view=aspnetcore-7.0

    Best regards,

    Xudong Peng


    If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.