Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Steen Rabol
    @rabol
    I know exactly which app i need to start
    Filip Vukovinski
    @vukovinski
    then you're all sorted. One more tip, to avoid some common production issues, beware that when run as a service the current directory of the app is C:\Windows\System32
    Steen Rabol
    @rabol
    I need a service that i can call from a remote web app, and then the service should start a specific app, then go into a “wait for messages on port xxx from the app” mode and then send each message back to the main web app
    Filip Vukovinski
    @vukovinski
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\my-service-name will tell you where the app is installed
    TeBeCo
    @tebeco
    i think since 3.0 the system32 issue is fixed
    that's was an issue before
    Filip Vukovinski
    @vukovinski
    no, it's waiting 6.0
    Ivan Milosavljevic
    @Vertygo

    Is it possible to implement custom model validation that would return custom model state (or has anyone implemented such a thing)?
    In the current implementation, the validation error item contains only the field name and error message (or code if you want to put it in the error message).
    My requirement is to return the error code alongside field name and error message. I would like to use asp.net core pipeline and avoid situation where I'm calling some custom validator in the controller method that returns BadRequest with custom validation error object.

    Found two related and old issues on github
    dotnet/aspnetcore#6661
    dotnet/aspnetcore#4840

    Filip Vukovinski
    @vukovinski
    sure you can plug into the aspnet core pipeline with some class
    the complexity of your model validator depends on the complexity of your object model
    the pipeline ends if a piece of middleware writes to the body
    and you can pass state between different middleware
    i'm not sure if there is any specific aspnet core validation class or interface to implement
    Ivan Milosavljevic
    @Vertygo
    @vukovinski that is true but I would prefer to tap into existing Model Validation inside of aspnet core pipeline than having to write middleware
    William Roseberry
    @RoseberryPi

    Haven't worked with Razor Pages apps before and I'm having trouble getting a form inside of a partial view to work. Submitting the form is not calling the OnPost method at all. Not sure what I'm doing wrong. Or how it's supposed to be done.

    Anyone have a link for creating forms specifically in a partial view?>

    William Roseberry
    @RoseberryPi
    Nevermind. I didn't realize that the partial view is not connected to its viewmodel but of the page's view model... Blazor has spoiled me much
    Alberto Passalacqua
    @AlbertoPa
    hint: View Components are also an option if applicable, and can doa bit more than partial views
    William Roseberry
    @RoseberryPi
    I'll have a look into those
    sadly they didn't make them JS-friendly, and favored that mess of Blazor Server integrated in MVC
    Arnas Kučinskas
    @Arnas-Kucinskas
    Is it possible to execute JS in .cshtml @{} block?
    Or only after code block is executed you can execute js?
    TeBeCo
    @tebeco
    js is executed in the browser
    html rendering is done by the server
    you can put js code inside razor page/template etc...
    but it's not going to execute somewhere else than the user loading the page on it browser and the code being called
    Arnas Kučinskas
    @Arnas-Kucinskas
    With Blazor components (.razor) I can call JS before rendering occurs (at least visually) in OnInitialize method.
    Trying to find out if I can do something similar in cshml forms. For example call local storage and then adjust variables in C# code.
    Sorry for late response.
    @tebeco
    TeBeCo
    @tebeco
    ok was not sure if it was razor on server side or blazor my bad
    i was confused with the @{} i guess
    can't tell for blazor specific life cycle
    Arnas Kučinskas
    @Arnas-Kucinskas
    It is on server side. Blazor was just an example, on how it works there.
    So from this I gather that it is not going to happen on server side?
    duckblaster
    @duckblaster
    yes, all cs runs before any js in .cshtml
    William Roseberry
    @RoseberryPi
    Does Razor Pages' partial views have support for an equivalent to Blazor's renderfragments in child components?
    Raif Harik
    @reharik
    Hello, I'm trying build an old .net 4.5 mvc app on ubuntu and I can't seem to figure out how to get the 4.5 framework. Can anyone help me?
    TeBeCo
    @tebeco
    you can't get the framework there
    it's windows only
    the only thing you can do is to reference nuget packages named Reference Assemblies
    and that will let me build
    but no test to run
    there's no runtime for netfx on linux
    only dotnet core
    Raif Harik
    @reharik
    ug, so there's no way to work on this application?
    TeBeCo
    @tebeco
    you can "build" only
    there's also Mono but i'm not sure you can have it out of the box compliant
    Raif Harik
    @reharik
    oh, so I can build but I can not run the app and access it in the browser?
    TeBeCo
    @tebeco
    exactly
    reference assembly are empty dll
    Raif Harik
    @reharik
    so with mono, what do you mean out of the box compliant?
    TeBeCo
    @tebeco
    it gives you something to compile against