I am writing the service for Authenticate user using webapi service in asp.net mvc4, This service is used in mobile app when the user login the using mobile app the Authenticate should be happen and I had written code for encrypted and decrypted here followed article http://www.codeproject.com/Articles/630986/Cross-Platform-Authentication-With-ASP-NET-Web-API error:
HTTPS is required for security reason.
Below error is displaying.
When check in browser or fiddler it's displaying the same error.
public static void Register(HttpConfiguration config)
{
TokenInspector tokenInspector = new TokenInspector() { InnerHandler = new
HttpControllerDispatcher(config) };
config.Routes.MapHttpRoute(
name: "Authentication",
routeTemplate: "api/User/{id}",
defaults: new { controller = "User" }
);
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional },
constraints: null,
handler: tokenInspector
);
config.MessageHandlers.Add(new HTTPSGuard());
}