Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    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");
    @SQL-MisterMagoo when you say "Process", I am assuming you are referring to an OS process? So the worker process would execute inside another OS process, and not within the api process itself?
    Joe4evr
    @Joe4evr
    yes
    SQL-MisterMagoo
    @SQL-MisterMagoo
    There are many ways to cook an egg, but preferably you don't make an omelette while you are still at the store, so yes - the api's job would be to add to the queue - nothing else.
    Stefan Ossendorf
    @StefanOssendorf
    @anthalon As I corrected myself I missed the await before the Process(). So you would need to write await Process();. That should trigger the exception.
    _ = Task.Run(async () => { try { await Process(); } catch (Exception e) { Console.WriteLine("caught"); } } );
    anthalon
    @anthalon
    oh, you are correct @StefanOssendorf
    Sanjeev M
    @zeus82
    Does anyone know how to enable mutual auth in aso core 5?
    Alok Sharma
    @aloksharma1
    Hello guys, i am having issues with razor runtime compilation with dynamic loader libraries
    An unhandled exception occurred while processing the request.
    InvalidOperationException: Cannot find compilation library location for package 'Ultra.TestLoader'
    this works fine on individual library but when i put my libs on host app it crashes with this exception
    i checked with debugger, the view inside the plugin library is called but the razor engine just doesnt stop their and pipeline goes in loop i think dont know how to fix this
    here is my mvcbuilder
     mvcBuilder.AddRazorRuntimeCompilation(options =>
                {
                    options.FileProviders.Clear();
                    options.FileProviders.Add(new PhysicalFileProvider(Directory.GetCurrentDirectory()));
                    ReflectionHelpers.GetAssemblyByInterface<ICustomViews>()?.ForEach(views =>
                    {
                        options.FileProviders.Add(new EmbeddedFileProvider(views.Assembly));
                        //options.AdditionalReferencePaths.Add(views.Assembly.Location);
                    });
                    //foreach (var dir in Directory.GetDirectories(Path.Combine(AppContext.BaseDirectory, "plugins")))
                    //{
                    //    //options.FileProviders.Add(new PhysicalFileProvider(dir));
                    //    var pluginFile = Path.Combine(dir, Path.GetFileName(dir) + ".dll");
                    //    options.AdditionalReferencePaths.Add(pluginFile);
                    //}
                    options.FileProviders.Add(new DBPageProvider(serviceCollection.BuildServiceProvider()));
                    options.FileProviders.Add(new DBCustomViewProvider(serviceCollection.BuildServiceProvider()));
                    options.FileProviders.Add(new DBViewModuleProvider(serviceCollection.BuildServiceProvider()));
                });
    Alok Sharma
    @aloksharma1
    i tried additional reference paths but nothing worked