none
Web Api 2.0 Unable To call startup.cs for oauth authentication RRS feed

  • Question

  • I am unable to call the startup.cs class in a web api2.0 project. startup.cs class is in the start_app folder and I tried removing the global.asax still the startup.cs class is not called my startup.cs class looks like below

    [assembly: OwinStartup(typeof(WCP.Services.Startup))]
    namespace WCP.Services
    {

    public class Startup
    {
    public OAuthBearerAuthenticationOptions OAuthBearerOptions { get; private set; }
    public void ConfigureAuth(IAppBuilder app)
            {
                OAuthBearerOptions = new OAuthBearerAuthenticationOptions();
                app.UseOAuthBearerAuthentication(OAuthBearerOptions);
      //...Cookie Auth Setup here...//
            }
    }}

    In web.config I added the following

    <add key="owin:appStartup" value="WCP.Services.Startup" />

    still the startup class does not call up is there something which I am missing to get the same called.

    Friday, July 18, 2014 11:25 AM

Answers

  • Hi,

    This forum is used to discuss the question about the WCF, then for your question it will be better for you to post it in the Web API forum, then you will get good replies from the Web API experts.

    #Web API Forum:
    http://forums.asp.net/1246.aspx/1?Web+API .

    Thanks for your understanding.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by pratish_kites Tuesday, July 22, 2014 10:45 AM
    Monday, July 21, 2014 11:21 AM
    Moderator