ASP. NET Zero--web.host Application

Source: Internet
Author: User

WEB. Host application

The AspNet Zero solution contains an additional project Web.host, which exposes all application functions as APIs. Therefore, you can use the API from any device??。 In fact, the WEB.MVC project is doing the same thing, providing APIs for all of the app's features. The difference is that the WEB.MVC project also has MVC controllers, views, scripts, and so on. If you only want to deploy APIs that do not have a UI, you can use the Web.host project. Otherwise you can even delete it. We are using the Web.host project to provide server-side APIs to Angular SPA .

Several notes in the Web.host project:

    • it only has Token-based (JWT) authentication (plus the possibility of social logins). There is no forms-based authentication (because there is no UI).
    • It does not implement CSRF protection because it is not a token-based authentication security concern.
    • It enables CORS. Therefore, cross-domain requests are allowed. It only allows http://LOCALHOST:4200 (see configured Startup classes).
    • Configure and enable Swagger UI by default.

ASP. NET Zero--web.host Application

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.