Base solution for your next web application

Activities of "bbakermmc"

How is everyone keeping up to date? Are you just using the project on github and then pulling the changes in? (Did you keep the same MyCompany.xxxx structure)?

Just trying to figure out the best way for us to start the project and if we should pull a copy of the github version into TFS and then go from there or pull the copy from the download site with the replaced names.

NM. Having a moment. I needed to give myself the role/permission for the nav then recycle the app pool.

Question

I have some permissions defined in the AuthProvided, and when I run it on my dev site, I see that it creates the permissions in my DB. When I move the code to prod, it doesn't create the permissions in the database. Ideas? I can still create users/login.

I fixed this by setting my Wreply

Wreply = websiteAddress.EnsureEndsWith('/') + "Account/ExternalLoginCallback",

If I turn of WSFederation the registration page will work. This error is occurring when it I press "Register" but its not making it to the action in the controller.

[ArgumentNullException: Value cannot be null.
Parameter name: parameter]
   Microsoft.IdentityModel.Protocols.AuthenticationProtocolMessage.SetParameter(String parameter, String value) +103
   Microsoft.IdentityModel.Protocols.WsFederationMessage..ctor(IEnumerable`1 parameters) +217
   Microsoft.Owin.Security.WsFederation.<AuthenticateCoreAsync>d__1f.MoveNext() +1589
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +28
public void Configuration(IAppBuilder app)
        {
            app.UseAbp();

            app.UseOAuthBearerAuthentication(AccountController.OAuthBearerOptions);

            app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);

            if (IsTrue("ExternalAuth.Facebook.IsEnabled"))
            {
                app.UseFacebookAuthentication(CreateFacebookAuthOptions());
            }

            if (IsTrue("ExternalAuth.Twitter.IsEnabled"))
            {
                app.UseTwitterAuthentication(CreateTwitterAuthOptions());
            }

            if (IsTrue("ExternalAuth.Google.IsEnabled"))
            {
                app.UseGoogleAuthentication(CreateGoogleAuthOptions());
            }

            if (IsTrue("ExternalAuth.MMCFederation.IsEnabled"))
            {
                app.UseWsFederationAuthentication(CreateWsFederationAuthOptions());
            }

            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                LoginPath = new PathString("/Account/Login")
            });

            app.MapSignalR();

            //ENABLE TO USE HANGFIRE dashboard (Requires enabling Hangfire in PlatformWebModule)
            //app.UseHangfireDashboard("/hangfire", new DashboardOptions
            //{
            //    Authorization = new[] { new AbpHangfireAuthorizationFilter() } //You can remove this line to disable authorization
            //});
        }

        private static WsFederationAuthenticationOptions CreateWsFederationAuthOptions()
        {
            var websiteAddress = ConfigurationManager.AppSettings["MMCFederation.Address"];

            var wtrealm = ConfigurationManager.AppSettings["MMCFederation.Address"];
            var metaDataAddress = "https://fs.mmcweb.com/FederationMetadata/2007-06/FederationMetadata.xml";

            return new WsFederationAuthenticationOptions
            {
                Wtrealm = wtrealm,
                MetadataAddress = metaDataAddress,
                AuthenticationType = "Windows",
                Notifications = new WsFederationAuthenticationNotifications
                {
                    RedirectToIdentityProvider = notification =>
                    {
                        if (notification.ProtocolMessage.IsSignOutMessage)
                        {
                            notification.HandleResponse();
                        }

                        notification.ProtocolMessage.Wreply = websiteAddress.EnsureEndsWith('/') + "Account/ExternalLoginCallback";

                        return Task.FromResult(0);
                    },
                    SecurityTokenValidated = notification =>
                    {
                        var name = notification.AuthenticationTicket.Identity.Name;
                        notification.AuthenticationTicket.Identity.AddClaim(new Claim(ClaimTypes.Name, name));
                        return Task.FromResult(0);
                    }
                }
            };
        }
Answer
bundles.Add(
                new StyleBundle("~/Bundles/vendor/css")
                    //.Include("~/Content/themes/base/all.css", new CssRewriteUrlTransform())
                    .Include("~/Content/themes/bootstrap-simplex.css", new CssRewriteUrlTransform())
                    .Include("~/Content/toastr.min.css")
                    .Include("~/Scripts/sweetalert/sweet-alert.css", new CssRewriteUrlTransform())
                    .Include("~/Content/flags/famfamfam-flags.css", new CssRewriteUrlTransform())
                    .Include("~/Content/font-awesome.min.css", new CssRewriteUrlTransform())
                );

Had to remove the CssRewriteUrlTransform() and then it worked..

Question

In my code I'm calling a apb.notify and its throwing an error. Its related to toastr it looks like

.done(function(data) {
                abp.notify.success('Address Verification Reset!', 'test');
                grid.dataSource.read();
            });

Its trying to do this:

http://localhost:30001/Content/data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf/3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==

I'm assuming its trying to load an image that goes with the message? Since I don't see a "Check" on the success, just a green message box.

It tells me: The length of the URL for this request exceeds the configured maxUrlLength value.

My bad, forgot to inherit the correct controller base :?

An exception of type 'Abp.UI.UserFriendlyException' occurred in Platform.Web.dll but was not handled in user code

Additional information: Ooppps! There is a problem!

Debug tries to open "UnitOfWorkInterceptor.cs"

Website then tells me I have a runtime error and to disable "Custom Errors" to see the message.

public ActionResult Index()
        {
            throw new UserFriendlyException("Ooppps! There is a problem!", "You are trying to see a product that is deleted...");
            return View();
        }

Nevermind, I had to wrap my controller action with the attribute and it was fixed.

Showing 141 to 150 of 164 entries