Click here to Skip to main content
15,905,563 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
Hi ,

I have the following code in my authconfig class in asp.net mvc 5 empty project

public class AuthConfig
    {
        public static void RegisterAuth()
        {
            // To let users of this site log in using their accounts from other sites such as Microsoft, Facebook, and Twitter,
            // you must update this site. For more information visit http://go.microsoft.com/fwlink/?LinkID=252166

            OAuthWebSecurity.RegisterMicrosoftClient(
                clientId: "",
                clientSecret: "");

            OAuthWebSecurity.RegisterTwitterClient(
                consumerKey: "",
                consumerSecret: "");

            OAuthWebSecurity.RegisterFacebookClient(
                appId: "",
                appSecret: "");

            OAuthWebSecurity.RegisterGoogleClient();

            OAuthWebSecurity.RegisterLinkedInClient(
                consumerKey: "",
                consumerSecret: "");

            OAuthWebSecurity.RegisterYahooClient();
        }
    }



but im getting error in it as : The name 'OAuthWebSecurity' does not exist in the current context in authconfig

i have imported all the packages from nuget :

DotNetOpenAuth.AspNet
Microsoft.AspNet.Providers.Core
Microsoft.AspNet.Providers.LocalDb
Microsoft.AspNet.Membership.OpenAuth
Posted
Comments
Kornfeld Eliyahu Peter 2-Jan-14 2:52am    
It's seems like a using or reference problem. Check it...
shanalikhan 2-Jan-14 2:54am    
which more reference i have to added in it. as i have referenced all the packages from nuget that i defined ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900