Base solution for your next web application

Activities of "neeraj k"

Hi All

Right now, asp.net boilerplate framework supports localization for resources which is working well in system. I have to work on a site which is completely multilingual along with the data entered in the system. So, to do this, I have followed an article on codeproject

<a class="postlink" href="http://www.codeproject.com/Tips/369845/Localization-with-Entity-Framework">http://www.codeproject.com/Tips/369845/ ... -Framework</a>

Now the issue I am facing is, because framework automatically saves changes at the end of the request, it also updates my tables. Basically, somehow i need to avoid the automatic update. One way is to modify the framework and remove the code which is saving changes at end of request and calling savechanges manually. Is there any other way ?

Thanks in advance for any help.

I am having an issue of infinite redirect loop for microsoft active directory login as third party login integration. Here are the steps that I followed

  1. Take module zero sample from github.
  2. Install nuget package Microsoft.Owin.Security.OpenIdConnect version="3.0.1"
  3. Added following code in startup.cs
public class Startup
    {
    private static string clientId = "xxxxxxxxx-xxxx-4d13-a09a-e00c10153a30";
        private static string aadInstance = "https://login.microsoftonline.com/{0}";
        private static string tenant = "xxxxxxxgmail.onmicrosoft.com";
        private static string postLogoutRedirectUri = "http://localhost:6242/";

        public void Configuration(IAppBuilder app)
        {
            string authority = String.Format(CultureInfo.InvariantCulture, aadInstance, tenant);
            // Enable the application to use a cookie to store information for the signed in user
            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                LoginPath = new PathString("/Account/Login")
            });
            // Use a cookie to temporarily store information about a user logging in with a third party login provider
            app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);

            app.UseOpenIdConnectAuthentication(
         new OpenIdConnectAuthenticationOptions
         {
             ClientId = clientId,
             Authority = authority,
             PostLogoutRedirectUri = postLogoutRedirectUri,
             Notifications = new OpenIdConnectAuthenticationNotifications
             {
                 AuthenticationFailed = context =>
                 {
                     context.HandleResponse();
                     context.Response.Redirect("/Error?message=" + context.Exception.Message);
                     return Task.FromResult(0);
                 }
             },
             CallbackPath = new PathString("/Account/Login")
         });

            // Uncomment the following lines to enable logging in with third party login providers
            //app.UseMicrosoftAccountAuthentication(
            //    clientId: "",
            //    clientSecret: "");

            //app.UseTwitterAuthentication(
            //   consumerKey: "",
            //   consumerSecret: "");

            //app.UseFacebookAuthentication(
            //   appId: "",
            //   appSecret: "");

            //app.UseGoogleAuthentication();
        }
    }
}
}
  1. This app has been registered in windows azure system.

It does take the user to microsoft login screen. User can enter the username and password for windows account. But after that, it got stuck into an infinite loop.

Can you please help me out here ?

Thanks

Showing 1 to 2 of 2 entries