Skip to main content
Home  ›  Blog

WebAPI 1.2 Basics - Your Server C# WebAPI Controller

WebApi is IMHO the most important part of ASP.net going forward. In this post I'll explain more about the server side of WebAPI. 

Pre-Requisites

In the following 9 minute Video, I'll show you

  1. Folder where to place your API-code (the api-folder)
  2. Registering your API (there is no registration, it just works by default)
  3. The code details like inherited classes naming conventions
  4. Sending data from the server to the client
  5. Simple examples sending back one or multiple values
  6. Security aspects like the security token and DNN-permissions
  7. Difference DNN-WebAPI and 2sxc-WebAPI, mainly that
    1. DNN requires visual studio, compiling and DLL deployment, 2sxc is happy with a text-editor and compiles on the fly
    2. DNN requires a "route registration", 2sxc does this automatically
    3. DNN requires DNN to restart when you edit the API,
    4. 2sxc only restarts the API
    5. DNN requires the API to be installed in the DesktopModules, for all portals, while 2sxc installs them in the Portals/x/2sxc folder, separating each portal and App  

Further links

With love from Switzerland,
Daniel 


Daniel Mettler grew up in the jungles of Indonesia and is founder and CEO of 2sic internet solutions in Switzerland and Liechtenstein, an 20-head web specialist with over 800 DNN projects since 1999. He is also chief architect of 2sxc (see github), an open source module for creating attractive content and DNN Apps.

Read more posts by Daniel Mettler