Hi @Anonymous , yes. it is redirecting to 404. Any help/guidance how to resolve this
Asp.net core razor pages(.cshtml) not loading properly after upgrading to .net 6 and angular 14
Hi Team,
Currently, in my project, we have the angular and .net core apps. The project was created using an SPA template adding angular to it. The projects had a few razor pages included. Now the issue is those razor pages not loading properly in CI/CD pipeline builds. However the razor pages loads always in development mode(local machine). Earlier, when we browse or hit the page in the browser's URL. it used to load the razor page. Now, it is not loading properly(most of the time doesn't load)
The method on the page is not called when we hit the URL on the page. Which supposed to load the content of the page.
.index.cshtml.cs
public async Task OnGetAsync()
We migrated the apps from .net core 3.1 and angular 9. x to .net 6 and angular 14. We assumed that might caused the issue. But we don't have concrete findings. Prior to the upgrade, everything was working fine.
Could you help me in understanding the logic of rendering the razor page (.cshtml)
Regards,
Umapathi.
Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | .NET | Other
3 answers
Sort by: Most helpful
-
-
Bruce (SqlWork.com) 81,981 Reputation points Volunteer Moderator
2023-09-20T18:26:00.81+00:00 you should publish to a folder, and run the app from the published folder. if it runs fine, then there is an issue in the CI/CD pipeline.
-
Anonymous
2023-09-21T09:21:36.99+00:00 Hi,@Umapathi Arumugam,judging from your description,I think you should try with
https://localhost:7182/Testinstead ofhttps://localhost:44428/TestWhen you input the url in address bar,it won't proxy
localhost:44428tolocalhost:7128And here's a document related with Troubleshooting ,hopes help
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.
Best regards,
Ruikai Feng