WEB APPLICATION :
https://www.c-sharpcorner.com/article/securing-your-Asp-Net-web-applications/
WEB SERVICE :
To configure Secure Sockets Layer (SSL) for a site in IIS 7, you could follow these steps.
Get an appropriate certificate.
Create an HTTPS binding on a site.
Test by making a request to the site.
Optionally configure SSL options, that is, by making SSL a requirement.
WEB METHOD :
WEB API :
1.**HMAC Authentication**
This security mechanism is common in public APIs and is relatively easy to implement. The client or application that wants to access your service will need an API Key and a Secret Key from you as the service owner. These keys are usually randomly generated strings and is given to the client beforehand. API Keys are unique to each client/application. Both the client and server will hold the API Key and Secret Key.
**2.Digital Signature
Digital signature relies on private-public key pair is a useful mechanism for securing server to server communication. It works by signing the message content with a private key to produce a security signature that can be verified using the corresponding public key (certificate). A key pair is usually provided by a certificate authority.
**3.OAuth**
OAuth is popular security mechanism that is widely used for user authentication. Similar to how a logged in session works on a website, OAuth requires the client user to “login” to the Web API before allowing access to the rest of the service.

