dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Tip: Add Support for Custom Media in ASP.NET Web APIs

See an example of how ASP.NET's Web APIs support custom formatters.


advertisement

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


ASP.NET's Web APIs support custom formatters. One of the best examples for a custom media formatter is a Vcalendar data format that can used in calendar software such as Outlook.

After you build the custom media formatter, all of you have to do is add it to the Web API configuration file. The WebApiConfig.cs is found in the App_Start folder.

In the register method, add the following line:

// CustomMediaTypeFormatter is the custom media type formatter created.
config.Formatters.Add(new CustomMediaTypeFormatter());

 

Visit the DevX Tip Bank

 





   
Srinath M. S. says: "I would love to leave a footprint in this flat world."
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date