Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "kythor"

where can I find this:

Please see this migration <a class="postlink" href="https://github.com/aspnetzero/aspnet-ze">https://github.com/aspnetzero/aspnet-ze</a> ... _0_11_2.cs

the link does not work anymore...

I have upgraded to version 1.0.0.0 and succesfully rebuild the solution. I needed to create a new migration, which includes:

CreateTable(
                "dbo.AbpUserClaims",
                c => new
                    {
                        Id = c.Long(nullable: false, identity: true),
                        TenantId = c.Int(),
                        UserId = c.Long(nullable: false),
                        ClaimType = c.String(),
                        ClaimValue = c.String(),
                        CreationTime = c.DateTime(nullable: false),
                        CreatorUserId = c.Long(),
                    },
                annotations: new Dictionary<string, object>
                {
                    { "DynamicFilter_UserClaim_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
                })
                .PrimaryKey(t => t.Id)
                .ForeignKey("dbo.AbpUsers", t => t.UserId, cascadeDelete: true)
                .Index(t => t.UserId);
            
            AddColumn("dbo.AbpUsers", "LockoutEndDateUtc", c => c.DateTime());
            AddColumn("dbo.AbpUsers", "AccessFailedCount", c => c.Int(nullable: false));
            AddColumn("dbo.AbpUsers", "IsLockoutEnabled", c => c.Boolean(nullable: false));
            AddColumn("dbo.AbpUsers", "PhoneNumber", c => c.String());
            AddColumn("dbo.AbpUsers", "IsPhoneNumberConfirmed", c => c.Boolean(nullable: false));
            AddColumn("dbo.AbpUsers", "SecurityStamp", c => c.String());
            AddColumn("dbo.AbpUsers", "IsTwoFactorEnabled", c => c.Boolean(nullable: false));
            AlterColumn("dbo.AbpOrganizationUnits", "Code", c => c.String(nullable: false, maxLength: 95));

Now I want to upgrade my databases, but I get the following error when executing the migration:

An error Occured during migration of host database.
SQLException : The Index 'IX_TenantId_Code' is dependant on column 'Code'
ALTER TABLE ALTER COLUM failed because one or more objects access this column

any help would be appreciated.

be advised, only solution that worked for me: updating Microsoft.Owin nuget package to version 3.1.0-rc1

This has been fixed in Katana 3.1.0-RC1 which is now available on nuget.org.

Apparently, facebook changed it's API, causing these problems. but even after following this solution: <a class="postlink" href="http://stackoverflow.com/questions/22364442/asp-net-mvc5-owin-facebook-authentication-suddenly-not-working">http://stackoverflow.com/questions/2236 ... ot-working</a>

is still get loginInfo = null

var options = new FacebookAuthenticationOptions
            {
                AppId = ConfigurationManager.AppSettings["ExternalAuth.Facebook.AppId"],
                AppSecret = ConfigurationManager.AppSettings["ExternalAuth.Facebook.AppSecret"],
                SendAppSecretProof = true,
                BackchannelHttpHandler = new FacebookBackChannelHandler(),
                UserInformationEndpoint = "https://graph.facebook.com/v2.8/me?fields=id,name,email",
                Scope = { "email" },
                Provider = new FacebookAuthenticationProvider
                {
                    OnAuthenticated = context =>
                    {
                        context.Identity.AddClaim(new System.Security.Claims.Claim("FacebookAccessToken", context.AccessToken));
                        foreach (var claim in context.User)
                        {
                            var claimType = string.Format("urn:facebook:{0}", claim.Key);
                            var claimValue = claim.Value.ToString();
                            if (!context.Identity.HasClaim(claimType, claimValue))
                                context.Identity.AddClaim(new System.Security.Claims.Claim(claimType, claimValue, "XmlSchemaString", "Facebook"));
                        }

                        return Task.FromResult(0);
                    }
                }
            };

            options.Scope.Add("public_profile");
Answer

it seems to be version 0.10.3.1 So how to proceed? I'm not a fan of updating the dll's on my production environment. Any other simple way to get this to work? I just need one background job atm. but when I go to /backgroundjobs, it always redirects to the login page.

Answer

Any idea why AbpHangfireAuthorizationFilter is not recognized in my code?

Abp.Hangfire is referenced and added as using.

Answer

I'm using MVC 5.x. The folder App_Data/Logs didn't even exist. So I created it and gave the IUSR write rights. But still nothing is added.

Answer

that seems to work. thx for the help

Success!

I got it to work! This is how:

add to Index.cshtml:

@section Scripts
{
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>

 @Html.IncludeScript("~/Areas/Mpa/Views/Articles/_CreateOrEditModal.js")
    @Html.IncludeScript("~/Areas/Mpa/Views/Articles/Index.js")

<script>
        $(document).on('focusin', function (e) {
            if ($(e.target).closest(".mce-window, .moxman-window").length) {
                e.stopImmediatePropagation();
            }
        });
</script>
}

add this to _CreateOrEditModal.cshtml

<textarea class="form-control tinymce" name="Body" id="Body" tabindex="1" required>@Model.Article.Body</textarea>
                    
                    <script type="text/javascript">
                        for (var i = tinymce.editors.length - 1 ; i > -1 ; i--) {
                            var ed_id = tinymce.editors[i].id;
                            tinyMCE.execCommand("mceRemoveEditor", true, ed_id);
                        }
                        tinymce.init({
                            selector: '#Body',
                            height: 600,
                            theme: 'modern',
                            plugins: [
                              'advlist autolink lists link image charmap preview hr anchor pagebreak',
                              'searchreplace wordcount visualblocks visualchars code fullscreen',
                              'insertdatetime media nonbreaking save table contextmenu directionality',
                              'emoticons template paste textcolor colorpicker textpattern imagetools'
                            ],
                            toolbar1: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
                            toolbar2: 'preview media | forecolor backcolor emoticons',
                            image_advtab: true,
                            templates: [
                              { title: 'Test template 1', content: 'Test 1' },
                              { title: 'Test template 2', content: 'Test 2' }
                            ],
                            content_css: [
                              '//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
                              '//www.tinymce.com/css/codepen.min.css'
                            ]
                        });
                        
                        
                    </script>
Showing 51 to 60 of 93 entries