is there any option to migrate website from .net 4.8 to .net 7?

Ramesh kumar 0 Reputation points

I want to convert my website which framework is 4.8 to framework .net 7.

Is there any option to direct migrate full application with making extra effort.

or is there any option to share session between .net 4.8 and .net 7 framework.

A set of technologies in the .NET Framework for building web applications and XML web services.
3,546 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
687 questions
ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
618 questions
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. AgaveJoe 24,391 Reputation points

    Is there any option to direct migrate full application with making extra effort.

    Microsoft offers an upgrade assistant.

    or is there any option to share session between .net 4.8 and .net 7 framework.

    I assume you want some kind of SSO? Sharing the authentication cookie is covered at the following link.

    Share authentication cookies among ASP.NET apps

    Keep in mind, that ASP.NET Core is very different form ASP.NET. There will certainly be some "extra effort" involved.

  2. Bruce ( 43,906 Reputation points

    it will depend on your 4.8 code. there is a migration path for MVC, but webforms requires a rewrite. if you used webforms, razor pages is the suggested upgrade, but its a template engine, not a component tree with events.

    As noted below, support is limited to external libraries. The core site must be c# or f#.

    while there is support for sharing authentication cookies between sites, there is no support for shared session. You would probably have to do a custom session for both. also 4.8 locks session for a request (no concurrent requests), and core does not lock session. so you would need a resolution for this.

    an approach would be to add a session create, get and save option to the 4.8 site. then the core site could call the 4.8 to access session. just use a common domain cookie with the session id.

    0 comments No comments

  3. Lan Huang-MSFT 17,726 Reputation points Microsoft Vendor

    Hi @Ramesh kumar,

    Is there any option to direct migrate full application with making extra effort.

    Microsoft has a dedicated migration guide: .NET Migration Documentation

    You can follow it to learn how to migrate applications from .NET Framework to .NET.

    There are a few things to consider when porting an application to .NET.

    is there any option to share session between .net 4.8 and .net 7 framework.

    You could refer to this document: Share authentication cookies between ASP.NET 4.x and ASP.NET Core apps, maybe it could help you.

    Best regards,
    Lan Huang

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. 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.

    0 comments No comments

  4. Mark Phillips 0 Reputation points

    Ramesh - no there isn't.

    I've actually been asking Microsoft for 2 years.

    The First Step seem to be:

    1. Convert .net framework 4.8 web 'site' to .net framework 4.8 web 'app'

    (I don't have confirmation about this yet though)

    0 comments No comments

  5. Albert Kallal 4,216 Reputation points

    Well, keep in mind that .net core and .net framework?

    From a coding point of view, you REALLY can't tell the difference.

    So, if you

    c#, console framework -> c#, console core?

    No real changes.

    c#, windows desktop framework - > c#, windows desktop core?

    Again, no real changes - you not notice the differences

    However, with web based applications?

    Then if you have say c# MVC framework?

    Again, to .net core? Really VERY few changes - and again you not notice the difference.

    However, a webforms .net framework?

    That's not going to convert automatic, and you need a near 100% re-write. And the reason is that .net core has no support for web forms.

    And 2nd to above, there is no choices for MVC core. (you have to use c#).

    So, for an existing MVC application? Then the referenced migration assistant pointed out above should do fine, and minimal changes will be required (in most cases).

    However, unless the web site application is a MVC application, then NONE of those tools are really going to apply, nor help you much in regards to a migration project.

    Since webforms is so VAST different then MVC, then that web form site no matter how you spin this will have to be re-written from scratch, and converted to a MVC project, (or a have been a razor site).

    So, if this was/is a web forms site? Then you need near 100% re-write.

    And if this is/was a MVC site written in Then that site probably should be converted to c#, and THEN you migrate to .net core.

    So, the .net core runtimes work like, look like, seem like and for the most part work VERY much like the .net framework runtimes. The only major change from .net framework to .net core is that .net core has the windows dependencies removed, and thus of course those runtimes thus are quite much CPU and even OS neutral to a far greater extent then the .net framework (which over the years did become relient on windows features).


    correction: The migration tools DO WORK for webforms.

    So, what occures is a .net core web site is created that is placed in front of your webforms application.

    The result is this setup:

    start migrating routes

    this is VERY ideal for a migration project, since then you running a .net core site, which runs in "front" of your webforms site. That THEN allows you to start (over time) moving pages from webforms to MVC (or blazer syntax). However, there are MANY questions we see of people attempting to run the webforms site "side by side" with the newer .net core web site. The above setup solves this issue in a much better approach, since in place of "side by side", you wind up wit a setup in which the .net core site runs IN FRONT of the web forms site. At that point then, develoeprs are free over time to start moving those webform pages over to the .net core app, and do so over time (which of course is ideal).

    So, while the conversion tools can't "convert" web forms, I stand corrected in that the migration assistant tools does not support nor have anything to do with webforms. The migration tools MOST certainly does support webforms. Of course the above diagram shows that no real conversion of the webforms occures, but it does setup for you a .net core site that runs in front of the existing webforms site. Then, over time, you can re-write and start moving single pages 1 at a time over to the newer MVC design approach.

    the above diagram, and link on how the migration assistant works is outline here:

    0 comments No comments