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
    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
    Sean
    @DapperDeer
    I'm running into an issue where my output contains a folder called "runtimes" but the runtimes inside of it are all Linux-based. I have a runtme specified (win10-x64) and while it does output that specific runtime, instead of being contained in the "runtimes" folder, it's just plopped in the same place as the rest of the artifacts. In fact, my output location goes from bin/net48/Release to bin/net48/Release/win10-x64 (and the runtimes folder is still inside with the Linux runtimes). Should also note that the win10 runtime being plopped in with the rest of the output doesn't even fix the real problem of the app not being able to find the win10 runtime. I have to make a win10-x64 folder inside the runtimes folder and put the dll in there for it to work
    TeBeCo
    @tebeco
    cross post on the other channel i suppose ? there's an attempted answer there
    Alok Sharma
    @aloksharma1
    hello guys, did the hosting system changed in net core, previously in mvc5 i was able to update modules by simply placing/overwriting dlls in bin folder, now howere with new version i have to do full publish and overwrite on my existing app this is killing me, the modules are ever changing and for every small change i cant just be doing full code ftp
    _
    i am using iis 10 for hosting inprocess
    Alok Sharma
    @aloksharma1
    hello, does anyone know how to implement custom view engine in net 5
    apparently razorruntimecompilation is not working for my use cases
    and all the different tutorials i found were of old mvc 4-5
    Alok Sharma
    @aloksharma1

    I'm running into an issue where my output contains a folder called "runtimes" but the runtimes inside of it are all Linux-based. I have a runtme specified (win10-x64) and while it does output that specific runtime, instead of being contained in the "runtimes" folder, it's just plopped in the same place as the rest of the artifacts. In fact, my output location goes from bin/net48/Release to bin/net48/Release/win10-x64 (and the runtimes folder is still inside with the Linux runtimes). Should also note that the win10 runtime being plopped in with the rest of the output doesn't even fix the real problem of the app not being able to find the win10 runtime. I have to make a win10-x64 folder inside the runtimes folder and put the dll in there for it to work

    i had this issue once, better create a new project and copy your publish settings from there.. apparently something messed up your publish settings, laos delete obj/bin folders before attempting with new settings

    Filip Vukovinski
    @vukovinski
    Hello! I'm having some issues deploying a React Spa app to IIS. It seems that some of the static files do not have proper relative paths. I've been searching around and found that there is limited info on the topic. Does anyone have experience with using IIS to host React Spa AspNet Core apps?
    Steen Rabol
    @rabol
    hi
    I’m about to start a new project, where we need to have a ‘service’ running on a pc, and then be able to launch an app, and when the app is running, then communicating with the app via http on a specific port, and the data received from the app should then be send to a REST web service
    how to get started ?
    TeBeCo
    @tebeco
    starting 3.1 you just have to add one line on program.ca yeah