[RESOLVED]secure my WEB API with oAuth2 using ACS

I have built my MVC 5 project and the web api project as well, published both on azure and all working fine.now I want to secure my web api with oAuth2 using ACS on azure. I have followed step by step the tutorial for that:

https://github.com/maartenba/WindowsAzure.Acs.Oauth2/blob/master/README.md#windows-azure-access-control-settings

and when running I’m having this error:

the AcsAuthenticationModule could not be registered for your application.Remove the AppStart_OAuth2API.cs file from your project and add the following entry under the system.webServer.httpModules section in the web.config:<add name=…../>

Ineed to know what is going wrong. I have tried the above but still shows an error that the path s missing

Hi,

If you would like to register module dynamically, you can try using
PreApplicationStartMethod
attribute.

For more information, please refer to the document:

#Register your HTTP modules at runtime without config

http://blog.davidebbo.com/2011/02/register-your-http-modules-at-runtime.html

#Three Hidden Extensibility Gems in ASP.NET 4

http://haacked.com/archive/2010/05/16/three-hidden-extensibility-gems-in-asp-net-4.aspx/

Leave a Reply