Base solution for your next web application

Activities of "uabel"

Hi everyone, we have the intermittent problem that we can no longer debug in certain browsers with Visual Studio 2022. The application tries to start and then it hangs on a white screen. Is there a solution to make it work again in the browser? We have already changed the port, recreated the application and cleared the browser cache.

Hello, we are using Windows Authentication in our application. This works very well. We have only one case where we have some problems. And that is when the user cancels the Windows login window.

Then comes a standard error page with a 401 error.

The URL is then: .../MixedAuth?state=c6ET79UdXtie-799oiesuH64HXRbfAmis-iT_7WVlclD4_KodxO9GDodMUwM9hNDnAeh5Z0CItYeil1jEUd883CmrAQTtfsXx5raNleKJKDDq9DqSvwUHguAjdCAx0vmsxmg79gERbNRt3fYivJuwlXCKcAkuamqNDMxhWSzCW2PCKvEjRSAmA8wIJy7jdWX

Is there any way to pick up this error? We would like to respond to it with a redirect. Possibly via a filter or similar ?

ActionResult result = new ChallengeResult("Windows", Url.Action("ExternalLoginCallback", "Account", new { ReturnUrl = returnUrl,Redirect =true})); The ExternalLoginCallback is unfortunately not called in the Cancel case.

Uwe

Hello, both are fulfilled in this way.

Uwe

Question

Hello, ASP.NET Core / Angular, Current Version auf Zero.

I have problem with Hangfire on production.

Locally in the development environment everything works. I have created a merged solution with dotnet publish -c release and installed it on the server. There everything is running too, I just can't access https://serverurl/hangfire

public const string SwaggerUiEndPoint = "/swagger"; public const string HangfireDashboardEndPoint = "/hangfire";

public static class WebConsts
{
    public const string SwaggerUiEndPoint = "/swagger";
    public const string HangfireDashboardEndPoint = "/hangfire";

Is there anything else I need to configure ?

/swagger and also my GUI/Angular is running.

With /hangfire I get /Error?statusCode=401

Greetings

Uwe

Thank you very much for the answer. Can you then also read out here which call it is? If so, what is the definition for this?

This is the function, here I try for example to also log the userId: `abp.log.log = function (logObject, logLevel) { if (!window.console || !window.console.log) { return; }

    if (logLevel != undefined && logLevel < abp.log.level) {
        return;
    }
    if (abp.session.userId != null) {
        console.log("UserId: " + abp.session.userId + " " +logObject);
    }
    else
    {
        console.log("UserId: Empty " + logObject);
    }
    
};`
Question

Is there any way that we can log the client side errors or show them in the popup as well? Here it would be nice if we could see the function incl. exact location and the logged in user. We are using abp 0.7.4

Thanks in advance.

I'm using one of the oldest versions 0.7.5.0

It is a very long function with several calls.

` private void HieararchyWalk(List<QMP3.CoreData.CoreData> hierarchy, List

        if (hierarchy != null)
        {
            foreach (var item in hierarchy)
            {
                newParentId = item.ParentId;   
                Logger.Debug("Id: " + item.Id + " Nummer: " + item.Nr);
                List<CoreDataVersion> versions = new List<CoreDataVersion>();   
                if (!allLanguages)
                {
                    var element = _coreDataVersionRepository.GetAll().Where(r => r.CoreDataId == item.Id && r.GlobalLanguageId == defaultLanguage.Id)
                            .OrderByDescending(r => r.State == State.Freigegeben).ThenByDescending(s => s.Revision).FirstOrDefault();
                    if (element != null)
                    {
                        versions.Add(element);
                    }
                }
                else
                {
                    foreach (var lang in _globalLanguageRepository.GetLanguages())
                    {
                        var element = _coreDataVersionRepository.GetAll().Where(r => r.CoreDataId == item.Id && r.GlobalLanguageId == lang.Id)
                            .OrderByDescending(r => r.State == State.Freigegeben).ThenByDescending(s => s.Revision).FirstOrDefault();
                        if (element != null)
                        {
                            versions.Add(element);
                        }
                    }
                }
                
                item.CoreDataVersions = versions;
                //item.CoreDataVersions = _coreDataVersionRepository.GetAll().Where(r => r.CoreDataId == item.Id).ToList();
                //.Where(r => r.CoreDataId == item.Id)
                //.OrderBy(s => s.State == State.Freigegeben)
                //.ThenByDescending(s => s.Revision).ToList();
                bool versionsToCopy = false;
                
                foreach (var version in item.CoreDataVersions)
                {
                    var newElement = new CopiedElement();
                    counter++;
                    newParentId = CopyElement(version, item, newParentId, versionsToCopy);
                    newElement.Label = String.Concat(item.Nr, " ", version.Label);
                    newElement.Sprache = version.GlobalLanguage.Label;
                    copiedElements.Add(newElement);
                    versionsToCopy = true;
                }
                foreach (var ele in item.Children)
                {
                    ele.ParentId = newParentId;
                }
                CoreDataIds.Add(newParentId.Value);
                HieararchyWalk(item.Children, CoreDataIds, allLanguages);
            }
        }
    }
    public GetServiceOutput CopyStructure(GetServiceInput input)
    {
        List<QMP3.CoreData.CoreData> hierarchy = new List<QMP3.CoreData.CoreData>();
        var test = _coreDataRepository.GetAll().ToList();
        hierarchy = test
                        .Where(c => c.Id == input.CoreDataId)
                        .Select(c => new QMP3.CoreData.CoreData()
                        {
                            Id = c.Id,
                            Nr = c.Nr,
                            DataType = c.DataType,
                            Color = c.Color,
                            MenuId = c.MenuId,
                            Publish = c.Publish,
                            ParentId = c.ParentId,
                            CoreDataVersions = c.CoreDataVersions,
                            Children = GetChildren(test, c.Id)
                        })
                        .ToList();
        var coreDataIdsToDelete = new List<int>();
        defaultLanguage = _globalLanguageRepository.GetDefaultLanguage();
        HieararchyWalk(hierarchy, coreDataIdsToDelete, input.AllLanguages);
        return new GetServiceOutput
        {
            CopiedElements = copiedElements
        };
        //return null;
    }
    `
    
    

We have in our Application.dll a recursive call with several database inserts/updates. After some time the error comes that 'The underlying provider failed on Open', which probably has to do with the many open and close of the database connections. How can we work around this problem? We need to write values to different tables.

Hello,. we have now tried Nlog, unfortunately there is the same problem.

After that we tried to update the Castle Framework and Log4Net. Unfortunately this is not possible because there are dependencies in Abp.

We then also tried to go to Abp 3.8.1, unfortunately there are so many changes (tenant management) etc. that this is probably very expensive. Is there a good way to

Greetings Uwe Abel

Showing 1 to 10 of 31 entries