Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    TeBeCo
    @tebeco
    but a request use the same "context" to not shoot you in the foot
    Taylor
    @TaylorWatson
    I share services between apps, and some apps need more inside the state container than the generic stuff. So this is helpful because like you said. I don't have to create the entire service to get access to the few things.
    TeBeCo
    @tebeco
    "between apps" sound fishy
    can't tell
    the DI container only exists once per app
    if you are sharing things accros app maybe you need to use a distributed cache to store the data
    or just expose route
    Arcanox
    @ArcanoxDragon
    I'm seeing some strange behavior with an ASP.NET Core application hosted in IIS. Regardless of what I have for Idle Time-Out and Recycling settings, it seems like IIS is restarting my worker process every minute. I can F5 in Task Manager and observe this...once a minute, the worker process restarts with a new PID. I'm using "OutOfProcess" hosting if it matters...has anyone else run into this?
    Arcanox
    @ArcanoxDragon
    stdlogs include an "Application is shutting down..." message every minute if I have them enabled, meaning the process is getting a SIGTERM from IIS, not crashing. I can't figure out what could possibly be causing this
    Arcanox
    @ArcanoxDragon
    ah, it seems to be a Virtual Memory limit on the app pool. I guess the runtime automatically reserves 2 GB (????) of Virtual memory immediately on startup, so it was "hitting" the limit right away. disabling that limit seems to have stopped the once-a-minute restarts (for now)
    sake402
    @sake402
     UIRootWidget UI => new UIRootWidget
            {
                Children =
                {
                    new BannerWidget
                    {
                        Title = SelectedFamily.Descriptor.Name,
                        SubTitle = SelectedFamily.Descriptor.ShortDescription,
                        Description = SelectedFamily.Descriptor.Description,
                        Image = SelectedFamily.Descriptor.BannerImage,
                    },
                    new SectionWidget
                    {
                        Children =
                        {
                            new LayoutRowWidget
                            {
                                Children =
                                {
    
                                   //Error here
                                    SelectedFamily.Descriptor.Features.Select<string, Widget>(f=> new FeatureWidget
                                    {
    
                                    }).ToArray()
                                }
                            }
                        }
                    }
                }
            };
    How do populate a List Initializer from linq.
    Children is a List<Widget> and is protected set
    public class ContainerWidget : Widget
        {
            public List<Widget> Children { get; protected set; } = new List<Widget>();
        }
    Palash Jhabak
    @palashjhabak
    Hi, I am trying to make a http request using HttpClient via a proxy. The proxy has to add a header in the response. But the proxy can only add the header if I make the request http and not https. But somehow HttpClient in the redirection phase from http to https follows the HTTP Connect (tunnel) protocol and not HTTP GET due to which proxy cannot read the headers. It is working absolutely fine in postman. Any way to force HttpClient to not use tunnel protocol ?
    Alok Sharma
    @aloksharma1
    i am trying to invoke view component using vc tag helper but what shoudl be the assembly path for it
    i am using it in areas
    and this is my taghelper path i have defined
    but its not working
    @addTagHelper *, Project.MyModule.Areas.AuthManager.ViewComponents
    that is the folder where view component exists am i doing something wrong
    L Suarez
    @lsuarez5280
    Getting some strange behavior out of my IIS InProcess-hosted Core 3.1 app. OIDC security middleware is calculating the redirect_uri scheme to be HTTP instead of HTTPS. What am I missing to get my app to recognize that it's being requested over SSL?
    Alok Sharma
    @aloksharma1
    @lsuarez5280 whats the middleware code?
    cant you simple check for httpcontext.request.host & path and correct url?
    Ashef Habib Tishad
    @ashtishad
    Suggest me some resources for practicing micro-services concepts. projects based learning is preferable.
    L Suarez
    @lsuarez5280
    @aloksharma1 figured out the cause is our load balancer forwarding requests internally over HTTP. Investigating https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-3.1 now.
    Yurij Molchanov
    @daviatorstorm
    Hello guys. Any ideas how to implement multiple users cookie sign in defers by, for example, systemId. Aka, user with systemId=1 comes to sign in page -> aspnet core checks cookies for user with systemId=1 and shows status if he is authenticated. If not authenticated - authenticate him in cookie. Then if same user with systemId=2 come to sign in page - page should take all authenticated users from cookie, check if user with systemId=2 is authenticated. If user with with systemId=2 is not authenticated then show him a sign in page and after user signed in - add that user to cookie with systemId=2
    TeBeCo
    @tebeco
    no clue what is SystemId to you
    are you speaking about Scheme ?
    and Challenge ?
    and Challenge on Scheme + SignIn on scheme
    never seen anything named "SystemId" in AuthN
    that's just specific to your project I guess so i can't tell about that
    Yurij Molchanov
    @daviatorstorm
    systemId is just another column in user table. and i need smth like google has. when you can choose between the users
    dimtabu
    @taburetkin
    can someone tell me how to run task before building docker in vs2019?
    dimtabu
    @taburetkin

    ok, forget about task :))
    i need an advise about project organizing.
    say, i have some .net5 common project (containing common utils and extensions)
    and i have some work project .net5 work and it includes common with project reference
    the folder structure is

    c:\dev\common\common.sln
    c:\dev\work\work.sln

    and works sollution explorer looks like:

    work solution
    -- common
    -- work

    that approach is pretty good if you do not try to publish to docker registry.
    and the question is: how exactly solution should be organized?
    i'd like to hold common separated from work if its possible

    anthalon
    @anthalon
    Hello. Let's say we have a backend API that does big processing that might take minutes or hours to complete, but we want to initiate that processing (call the async method that starts it, let's say public async Task Process()) through a http request in a Get Action. I want the Get Action to start the processing, but not hold the http request, instead I want it to return as soon as it starts the process, and end the http request
    What is the best way to achieve this? if I just call Process() and return "started" it should work, however if Process fails with an exception I won't know
    or would it be better to set a flag in some class that runs on a timer and executes code if flag is set?
    or is there another better way
    Stefan Ossendorf
    @StefanOssendorf
    @anthalon Don't use GET ;-)
    I probably would just do a _ = Task.Run(async () => try{ Process(); } catch( Exceptione xc) { ...});
    And yes your caller does not get any information about an error. So you would need to provide him an URL where he can ask for the current state of the processing. E.g. return a processingId and he can query the state with that.
    anthalon
    @anthalon
    I want to be able to start processing remotely at any time, that's why I am wondering if it's possible to do so through an http cal (GET for example) @StefanOssendorf
    Stefan Ossendorf
    @StefanOssendorf
    It is possible even with a GET.
    Oh in my snippet above is the await missing before the Process()
    anthalon
    @anthalon
    and to clarify, Process() would be a public async Task Process(), meaning that the catch (Exception xc) would never be triggered
    if Process() returns void instead, then the app crashes
    assuming the return type is Task, how can I know the function failed with an exception?
    Stefan Ossendorf
    @StefanOssendorf
    Why would the catch() not be triggered? Exactly for that case we execute it within a new task.
    SQL-MisterMagoo
    @SQL-MisterMagoo
    Don't start the "Process" from the API - use an api to add an entry to a queue, use a worker process to process the queue - use another api to query the progress of the item in the queue.
    Stefan Ossendorf
    @StefanOssendorf
    That would probably be even the cleaner apporach.
    anthalon
    @anthalon
    _ = Task.Run(async () => { try { Process(); } catch (Exception e) { Console.WriteLine("caught"); } } ); does not get into the catch, in the Process() I just have this:
    await Task.Delay(5000);
    throw new Exception("error");