locked
OAuth controller never being invoked on ASP.NET MVC web site? RRS feed

  • Question

  • User355099563 posted

    I have an ASP.NET web site that I am trying to get working with Twitter OAuth using the Microsoft OWin package. I did not use the main ASP.NET project wizard to start the site because I wanted to take advantage of the wizard for a set of HTML5 components (Wijmo). Because of this I had to manually include all the necessary Owin packages and extensions, and copy over the file Startup.cs and the OAuth directory and files from another project that did use the ASP.NET main wizard.

    Now I find myself with all the pieces in place for doing Twitter OAuth, but there is something about my configuration that isn't right. When I run the site the OAuth controller is never invoked.

    The project I studied to implement Twitter OAuth is the LinqToTwitter MVC demo for ASP.NET. First, I made sure that the ASP.NET session state service was started/running. Then, I ran the MVC demo project and it does bring up the OAuth index view that asks you to authorize the current app (site) before preceding. The OAuth process worked fine in that project.

    Then I made sure that I had all the same package references and extensions as that project. Everthing builds fine. But as I said, when I run my site, it ignores the OAuth code.

    What do I have to change/edit to get my project to invoke the OAuth controller? Also, if anyone has a link to a web page that explains the behind-the-scenes operations that take place when an ASP.NET/OAuth app runs, please share it. When I went back to the MVC demo project and set a breakpoint on the Startup.ConfigureAuth() method, all the calls on the stack were from external code so I don't know where to look to find the configuration change I need to make to get this going.

    Thursday, April 10, 2014 2:46 PM