Sort out some trivial things about webapi.

Source: Internet
Author: User

When we use WEBAPI, we encounter some problems, such as

1.POST How to request

2. How to be compatible with JSONP requests

3. How to provide cross-domain requests to the specified end

4. How to display the annotations of a separate models layer

Question one or two other people are playing more mature, Baidu a few thousands of answers.

This article is about question 4

Say the steps on the line, do not want to type anyway is someone else there copied directly on the original

http://stackoverflow.com/questions/21895257/ How-can-xml-documentation-for-web-api-include-documentation-from-beyond-the-main

Because if the models of the project itself can be annotated, why not go out alone?

The article probably explains that when we use the project in area we generate an XML comment file for it, which is generated for the project itself, and when your model goes out alone, it just generates an XML file for the model layer alone. And then he's assigned his line in the HelpPageConfig.cs.

Config. Setdocumentationprovider (New Multixmldocumentationprovider (HttpContext.Current.Server.MapPath ("~/app_data/ Xmldocument.xml "), HttpContext.Current.Server.MapPath (" ~/app_data/muzuapi.model.xmldocument.xml "));

Sort out some trivial things about webapi.

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.