Click here to Skip to main content
15,942,710 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
We have a website which now has only static webpages on a .net 4.8 using masterpages and NO c# coding at present. We want to move it to .net 6.0 on our shared hosting.

We are trying to figure out if we can run both as we change 2,000 webpages in either a 301 redirect in the old aspx file to the blazor .net 6.0 cshtml file or do the whole website in an IIS redirect which in .net 4. 8 would be in the web.config file.

We have been figuring out how to have the static menu content areas brought in similar to the purpose of masterpages in .net 4.8 ( we think).

How do we move this static website basically of only webpages from .net 4.8 to .net 6.0?

What I have tried:

Looked up info on .net 6 equivalent to masterpages...bring in content such as header footer and menus on side
Updated 25-May-23 12:32pm
Graeme_Grant 24-May-23 22:40pm    
Not enough information. Are you using WebForms or MVC or what exactly? If static pages only, why blazor? Blazor is a SPA framework, not designed for but could be used with static pages. Blazor, in this case, is like using an elephant gun to shoot a mouse! 25-May-23 18:18pm    
Please see our other long reply. We have a website with statistic aspx webpages and a web.config file with .net 4.8 runing on a shared hosting that does .net 4.8 and .net 6. we may wish to program some login etc in the future. We have about 2,000 webpages and we thought we have to move them at some point, not sure when from asp .net 4.8 to .net 6 or whatever and therefore the file ending .aspx is a concern because we have had over 50M visitors to our website since 2003 and don't want to lose the links on the internet. What .net should we use going forward? we thought we should move to .net 6 and webpages that end in cshtml which will remain for decades on the internet. We though that all the .net versions going forth will use webpages endiuugn in cshtml so we are covered for the webpage name change aspect. We hope to actually do coding in Blazor or Razor or whatevr in the future but don;t want to waste molney on coding our ligins or whatever and then have to pay again in the next few years to do it over in Razor or Blazor. Microsoft Build sessions yesterday did say Blazor was the future and razor would be diminished
Graeme_Grant 25-May-23 18:31pm    
You did not read my question. WebForms or MVC? Razor = MVC, Blazor uses Razor syntax. If going from WebForms to Blazor, then there is a bit of work to be done, there is no easy conversion.
Graeme_Grant 25-May-23 18:39pm 25-May-23 19:18pm    
We saw those. They didn't answer our basic question. What we every have to upgrade from 4.8 to any future version of .net? and if we are going to develop any C# /coding in the future will we/ should we change. Is it correct that if we want to develop any coding on this html/js website we need to pick the future coding framework? The youtubes you provided don't help us understand what we need, unfortunately. We started this website v20 years ago using asp .net 2.0 or maybe 1.0. We just kept adding html content and never used C# in webforms or MVC. Please look at the website source. We are trying to set this up for the future and be able to use coding for things in the future, when we need that.

1 solution

If going from MVC to MVC, then there is a tool. See this: Learn to upgrade from ASP.NET MVC and Web API to ASP.NET Core MVC | Microsoft Learn[^]

If going from WebForms to MVC, then see this: Learn to upgrade from ASP.NET Web Forms to ASP.NET Core | Microsoft Learn[^]
Share this answer
Comments 25-May-23 19:34pm    
Our question has nothing to do with MVC or webforms. We don't use any coding yet other than basic website html and some menu JS. We are trying to esctablish wwhat we should be on for the futre so we can develop if we need to do so and would like to have someone do that in the future. We currently have 2,000 wepbages of .aspx webpages and don't want to lose the links on the internet if we should switch to .net for the future so we can start developing other than just html and JS menus. As I understand it, and I don't l know much about .net, if change our website to use .net 6 , we will have to use razor cshtml webpages or blazor with the same ending on the webpages of .cshtml. Is that correct. All of this effects labour on changing 2,000 webpages and getting 301 redirects on indiviual changed webpages or doing the whole thing and then a 301 redirect on the web.config or equivalent or a mo rewrite...whatever to redirect permanently and NOT lose the website links from 20 years
Graeme_Grant 25-May-23 19:52pm    
If you want someone to write code for you, then there are these services:
* fiverr[^]
* Upwork[^]
* Freelancer[^]
* Guru[^]
* PeoplePerHour[^]
* TaskRabbit[^]
* Karat[^] 25-May-23 20:26pm    
Thanks for the sources of coders. We don't need coding in the immediate future. We just need the big bigger on what platform 4.8 or .net 6+ we should use for the next 20 years for a website which is html and js only right now. The we would get coders at various time. Our immediate concern is to pick the future for this website... net.4.8 for 20 years, .net 6 and it's followers , or for some reason switch this one time to php and then use it forever. We don't want to lose the links from our 50 million visitors. Graeme, thanks for all your efforts in answering.. It might have saved time if you looked at the website for 1 minute... Can we use on the same website with .net6.0 and use webpages that work with either one of 4.8 or 6.0?
Graeme_Grant 26-May-23 0:04am    
My recommendation is to pick your home page and a couple of pages and mock/prototype to see what is involved to migrate - it's a day's work at most, less time than the time spent here.

If you're going to do a straight swap-out, then no 301s for SEO required. If you doubt me, engage an SEO expert, the cost is an investment well spent.

If you are going to do it in stages, it is discussed in this video how that would be approached: ASP.NET Core and Blazor futures Q&A | DIS201H - YouTube[^]. 29-May-23 16:42pm    
SEO expert said to use 301 redirects on individual old webpages ( aspx) point to new webpages (.cshtml) for sure and leave them forever because of thousands of people all over the world providing links in. I take it that if all webpages are converted to .net6 ( cshtml) , and we can run .net4.8 and .net 6 at the same time on the shared hosting, that won't be a problem. The only reason at this point to use Blazor over Razor is for the static format use on all webpages 2,000 as the replacement for the masterpage in .net 4.8. as long as thee Razor and Blazor both use files ending in .cshtml, it doesn't matter to use probably until we decide to develop some coding in the website. Both Razor and Blazor files end with .cshtml don't they?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900