question

fp2021-1628 avatar image
0 Votes"
fp2021-1628 asked YijingSun-MSFT answered

Combine information from several .net web form applications

We have several web form applications that were developed using .NET 4.0 framework. There is a need to now have some of the information from several web applications displayed in one common place/application. What would be the best option for this scenario? Should we create a new .NET web application in VS 2019 that pulls existing information via web services or web APIs?

dotnet-csharpdotnet-visual-basicdotnet-entity-framework-coredotnet-aspnet-webpagesdotnet-adonet
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DuaneArnold-0443 avatar image
1 Vote"
DuaneArnold-0443 answered DuaneArnold-0443 edited

IMHO, you should be using an ASP.NET Core Razor page project that is not unlike using a Web form, because it has a page like code behind file for a given cshtml page, and anyway ASP.NET Webform is legacy technology.

Web service are legacy technology, and you should also be looking into use ASP.NET Core MVC WebAPI along with EF Core being used behind the WebAPI with the DAO pattern.

https://javarevisited.blogspot.com/2013/01/data-access-object-dao-design-pattern-java-tutorial-example.html

The DTO pattern can also be used between the Razor MVC client and WebAPI.

https://docs.microsoft.com/en-us/aspnet/web-api/overview/data/using-web-api-with-entity-framework/part-5

https://www.codeproject.com/Articles/1050468/Data-Transfer-Object-Design-Pattern-in-Csharp

Understand the Models, since a Razor page project uses the MVC pipe line.

https://deviq.com/terms/kinds-of-models

https://www.dotnettricks.com/learn/mvc/understanding-viewmodel-in-aspnet-mvc

An example Razor page solution using WebAPI doing CRUD with EF.

DM = domain object and VM = view model.

https://github.com/darnold924/PubCompanyCore3.x

https://docs.microsoft.com/en-us/archive/msdn-magazine/2016/may/asp-net-writing-clean-code-in-asp-net-core-with-dependency-injection

https://docs.microsoft.com/en-us/dotnet/architecture/modern-web-apps-azure/architectural-principles

https://levelup.gitconnected.com/layers-in-software-architecture-that-every-sofware-architect-should-know-76b2452b9d9a

HTH

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YijingSun-MSFT avatar image
0 Votes"
YijingSun-MSFT answered

Hi @fp2021-1628 ,
As far as I think,you could create a new web application to combine multiple web apps. It's convenient for migrating codes. In the new application,you could do separation.
You could a separate folder for each feature and allow all features to share the same masterpages, usercontrols, and configuration file - without having to do anything special.
Best regards,
Yijing Sun


If the answer is helpful, please click "Accept Answer" and upvote it.

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.