Reputation: 41
I've got a web forms application that i need to integrate Facebook, google and twitter log in but what I've found with all the tutorials is that my solution does not have Startup.auth.cs, and then when i implement a Owin class and try to call
app.UseCookieAuthentication
i get the error that owin.iappbuilder doesn't contain the definition.
I am using a 4.5 .net framework and do not have MVC so any help would be great.
I have been stuck on this error for quite some time so getting past this with help or a direction to a tutorial will be a great relief
Upvotes: 2
Views: 1403
Reputation: 32072
See here for a tutorial on how to do this. You want this part:
using Microsoft.AspNet.Identity;
using Microsoft.Owin;
using Microsoft.Owin.Security.Cookies;
using Owin;
[assembly: OwinStartup(typeof(WebFormsIdentity.Startup))]
namespace WebFormsIdentity
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
// For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Login")
});
}
}
}
Upvotes: 1