Project template to create production-ready RESTful service based on ASP.Net WebAPI and OWIN. It contains Swagger-documentation, preconfigured DI-container, logging, CORS, JWT-bearer authentication, boilerplate code and other features
The template is targeted to the 4.7.1 version of .Net Framework. Make sure that you have it installed before using the template.
Contains:
CORS enabled
preconfigured HTTP OPTIONS handler
preconfigured Cache-Control header to disable caching
Autofac as a DI-container
Content formatter configured to use Json.Net
AutoMapper
Unhandled exceptions handler
Unhandled exceptions logger
Serilog as a default logger preconfigured to save logs to %AppData%/Logs folder
Swagger for API documentation
JWT-Bearer authentication to protect your API with IdentityModel
Ability to use environment variables in configuration options (web.config)
Support .env files to easy switching between different environments (DotNetEnv)
... and some other boilerplate code
Getting Started
Install the extension from the Visual Studio Marketplace or download and install the latest version from the GitHub. Also, you can install it from Visual Studio. To do so click on "Tools/Extensions and Updates..." menu item, then select "Online/Visual Studio Marketplace/Templates" on the left pane, search for "ASP.Net WebAPI Application Project Template," select it and click "Download" button.
Restart Visual Studio
Click on "File/New Project..." menu item
Type "webapi" on the right pane
Select "APS.Net WebAPI Application With OWIN" and click OK button.
Run the service
Open a browser and navigate to http://localhost:5000/swagger/ui/index to see API documentation
Play around with the API
Visit project Wiki pages to learn more about the template.