简体   繁体   中英

Micro services with a MVC front-end in .Net Core

I couldn't find any content on web on this topic. Most articles stop at calling APIs with Postman. I can't use Web MVC frameworks (Angular, React etc.) for the front-end of the application because of our organization policy. So I have to use .net core MVC for the front-end. First of all, is it a bad idea? From my research I think HttpClientFactory is the way to consume APIs/Services in the server side code of the front-end MVC. Apart from that, I will be consuming the APIs using jQuery ajax. Any other ways to call or utilize APIs in the front-end? Thanks in advance if anyone can point me in the right direction.

You need to use OpenId connect mechanism in your MVC website. You can see real-world example in github from Microsoft

https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/src/Web/WebMVC

You can check out Startup.cs file for openid authentication example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM