Migrate Existing Asp.Net Web Site to .Net Core

Migrate Existing Asp.Net Web Site to .Net Core

  1. Convert System.Web to Microsoft.ASPNetCore
  2. Asp.net Core has a web.config, but you use it in your migration you will be limited to only using IIS and not Linux Web Server like Nginx
  3. Convert global.asax to startup.cs file
  4. Migrate web.config file to appsettings.json if you want to utilize cross-platform aspect of .Net Core
  5. Move all static files to a wwwroot folder (Remember to move only assets that you need, the files in folder might be compiled and sent to the front-end. Research about the difference from Asp.Net Website and Web Application: hit, websites only compile assets that are referenced in the master page, while web application compiles everything in the form of a dll)
  6. Remove HttpContext references: this API is still undergoing major writes.
    - HttpContext.Current API is not even included in core 2.2
  7. Update Authentication and Authorization API
    - If you are using Authentication API before Identity, you are advised to update now.
  8. Add necessary Front-End library
  9. Use BundleMinifier extension instead of System.Web.Optimization
  10. Migrate all your Views
    -Razor is backward compatible
    -Conver Views/Web.config to Views/_ViewImports.cshtml
    -Convert namespaces.add to @using
    -Migrate any settings to main application configuration
    - @Script.Render and Style.Render do not exist anymore

Edit this Article
asp.net Core 3.1 asp.net mvc asp.net core errors asp.net web forms asp.net core tutorial Technology published
Was this page helpful?
Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

Your Session is Ending
Login to Continue

© 2021 - ErnesTech - Privacy