Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    മാഹിക്കാരൻ
    @shibinraj_twitter
    01_scnshot.jpg

    @shibinraj_twitter Is the app.UseAuthorization called before app.UseDotVVM? Also check that the Authorize attribute is from DotVVM.Framework.Runtime.Filters namespace, not from Microsoft.AspNetCore.something.

    Yes its called before app.UseDotVVM , also Authorize attribute is from DotVVM.Framework.Runtime.Filters namespace

    മാഹിക്കാരൻ
    @shibinraj_twitter
    02_scnshot.jpg
    @tomasherceg
    Is there anything wrong with my LoginPath Url ?
    മാഹിക്കാരൻ
    @shibinraj_twitter
    @tomasherceg
    Authorize attribute is working if i put it for the whole viewmodel.
    gkirk90
    @gkirk90
    @tomasherceg Extension v2.5.250.0 is not recognizing the fact that I have Pro Version and complains of config issues when Visual Studio fires up (16.9.2). Any ideas?
    Anup Chaturvedi
    @anup.chaturvedi_gitlab

    @anup.chaturvedi_gitlab Which version of DotVVM are you using? We had this bug recently but it should be fixed in DotVVM 2.5.2.

    @tomasherceg : Thanks I was using the old version, so upgraded and it fixed the error.

    മാഹിക്കാരൻ
    @shibinraj_twitter
    @tomasherceg
    I am displaying a session time out warning to users on my webform app using jquery.. can i use the same in Dotvvm master view page ?
    thatdbme
    @thatdbme

    I am looking for a way to limit access to the contents of a dot:Content control such that if the user has a role (as defined in my application, not IIS), they see the contents, otherwise they get a no access message. I have a MasterPage with the ContentPlaceHolder and the Dothtml page and MasterPage both inherit the same base viewmodel (which inherits from DotvvmViewModelBase).

    I have tried several combinations of things but nothing gives me what I need. I see there is a RoleView control but the documentation is very thin and does not explain how to set the roles and how it determines what roles a user has. I have not been able to find any other info about it online anywhere.

    Is there a better example anywhere? Is there another way to do what I need? Thanks.

    Standa
    @exyi:matrix.org
    [m]

    The RoleView uses standard Asp.Net Core user management (from HttpContext.User). You can use the identity API to sign the user in (and thus give an auth cookie) using something like Context.SignInAsync(new ClaimsPrincipal(new ClaimsIdentity(new [] { new Claim(ClaimTypes.Role, "myrole"), .... other things s.a. name }))).

    See the docs these methods and types: https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.authentication.authenticationhttpcontextextensions.signinasync?view=aspnetcore-5.0

    I guess you'll need to AddAuth* in the Startup, see more on Auth in Asp.Net Core: https://docs.microsoft.com/en-us/aspnet/core/security/?view=aspnetcore-5.0

    @shibinraj_twitter

    I am displaying a session time out warning to users on my webform app using jquery.. can i use the same in Dotvvm master view page ?

    Most likely yes, depends on how you'd like to detect that session has expired. It will probably throw an exception on the server which you could catch and assign some error to a property in the view model.

    Again, I'd like to ask you to reconsider using session at all, there is actually very few legitimate uses for this.

    മാഹിക്കാരൻ
    @shibinraj_twitter
    @exyi:matrix.org
    Authorize attribute is working only for the whole viewmodel , not working for particular action or method.. Is it like that only?
    Standa
    @exyi:matrix.org
    [m]
    No, Authorize should also work for commands, how are you using it?. The problem is that it only works when you invoke the [Authorize] annotated method directly from command/staticCommand - there must be no indirection.
    മാഹിക്കാരൻ
    @shibinraj_twitter

    No, Authorize should also work for commands, how are you using it?. The problem is that it only works when you invoke the [Authorize] annotated method directly from command/staticCommand - there must be no indirection.

    I tried to put the [Authorize] attribute above Init() command.

    Standa
    @exyi:matrix.org
    [m]
    You mean the override ... Init method? That does not support Authorize, you should put it on the whole viewmodel
    മാഹിക്കാരൻ
    @shibinraj_twitter
    On the Whole viewmodel its working

    @exyi:matrix.org
    When i tried to host the Core 5 application IIS , i am getting the following error..

    DotVVM.Framework.Routing.DotvvmRouteStrategyException: Cannot auto-discover DotVVM routes. The directory 'C:\Users\shibin.vk\Desktop\Package\Publish\CoreWebsite\Views' was not found!

    Standa
    @exyi:matrix.org
    [m]
    Does the directory exist? Does IIS have rights to access it?
    മാഹിക്കാരൻ
    @shibinraj_twitter
    after publishing Views folder is not present.. its my first publish on .Net core..
    04_publish.jpg
    @exyi:matrix.org
    This is the structure. its not publishing the views and viewmodel folders..
    Standa
    @exyi:matrix.org
    [m]
    I though it was in the template, but you should have something like this in csproj for publish to work: https://github.com/riganti/dotvvm-samples-checkbook/blob/master/src/CheckBook.App/CheckBook.App.csproj#L7
    മാഹിക്കാരൻ
    @shibinraj_twitter

    I though it was in the template, but you should have something like this in csproj for publish to work: https://github.com/riganti/dotvvm-samples-checkbook/blob/master/src/CheckBook.App/CheckBook.App.csproj#L7

    ok thanks .. it worked now

    മാഹിക്കാരൻ
    @shibinraj_twitter
    @exyi:matrix.org
    Can we write jquery methods in view page same as in aspx pages ? can we get Model property values inside jquery functions?
    thatdbme
    @thatdbme
    Thank you, @exyi:matrix.org . It looks like that may not be available outside of .Net Core. We are not using Core yet and are still in Framework 4.8. I will keep the notes until the future. Hopefully we'll be able to use the RoleView and other Core functionality in the future.
    മാഹിക്കാരൻ
    @shibinraj_twitter
    @tomasherceg
    how can i show a Bootstrap alert message for Save action ?
    Tomáš Herceg
    @tomasherceg
    മാഹിക്കാരൻ
    @shibinraj_twitter

    @tomasherceg
    Hi, How to show a red colour validation warning around Radio button group control , Error message is showing but control is not highlighted.. How to do that ?

    @exyi:matrix.org

    Kai Braaten
    @kaibraaten
    Will you release version 3.0 of DotVVM.Controls.Bootstrap anytime soon?
    Jack Fisher
    @JackkFi5h
    Currently migrating an .ashx handler that saves a file stored in the HttpContext sent (in my legacy web forms application), Only issue i'm running into is how to extract the file from the context supplied in the Custom Presenter class I've made for it, in the method ProcessRequest(IDotvvmRequestContext context). Before I would just use HttpPostedFile file = context.Request.Files[0]; to get the file And can't seem to find anything similar in this new context. The closest thing I've found is HttpContext.Request.Body which is of type Stream, If anyone could point me in the right direction on getting the file stored in the request that'd be great!
    Tomáš Herceg
    @tomasherceg
    @kaibraaten It should be released very soon, my colleague is just finishing the upgrade of the packages.
    @JackkFi5h Not sure if I understand what the handler actually does - are you POSTing files to the handler? What is the content-type? Is it multipart/form-data?
    @shibinraj_twitter You need to create some CSS class which will highlight the control, and then apply it on the control using Validation.InvalidCssClass="error". The CSS can look like this: .error input[type=radio] { border: solid 1px red } (in case the class is not applied on the input element but on its parent element)
    Jack Fisher
    @JackkFi5h
    @tomasherceg Yes I am posting files (specifically images) and yes the content type is multipart/form-data, Essentially just need help getting the actual file so I can save it, but I can't seem to find out what property to use (given the context ProcessRequest(IDotvvmRequestContext context) provides)?
    Tomáš Herceg
    @tomasherceg
    @JackkFi5h If you are using ASP.NET Core, there is an extension method context.GetAspNetCoreContext() which can do the trick - there should be Request.Form.Files.
    In OWIN (old .NET Framework), there is context.GetOwinContext() and then Request.Content.ReadAsMultipartAsync.
    Jack Fisher
    @JackkFi5h
    Is that ReadAsMultipartAsync A new function or something as It is not recognized in my version 2.5.1
    മാഹിക്കാരൻ
    @shibinraj_twitter
    @tomasherceg
    Hi, Is there any Export option present in your Gridview Bussiness pack? any sample application present in github?
    മാഹിക്കാരൻ
    @shibinraj_twitter
    DotvvmBPinstall.jpg
    Hi.. Install button not working in VS2019 for bussiness pack
    @tomasherceg
    മാഹിക്കാരൻ
    @shibinraj_twitter
    I think business pack installation not working for .Net Core 5
    മാഹിക്കാരൻ
    @shibinraj_twitter
    Anyone using advanced Gridview control with export features like CSV,Excel and PDF ?
    Kit Thomas
    @kitmaxthomas_twitter
    image.png
    what's the best way to prompt the user before running a command, the normal confirm does prompt as it should but the Click command doesn't run
    Václav Novotný
    @vaclavnovotny
    മാഹിക്കാരൻ
    @shibinraj_twitter

    nugetErr.jpg

    Hi.. I am getting an error like this when i tried to run command for adding DotVVM Private NuGet Feed
    @tomasherceg

    David Najman
    @dnajcz
    @shibinraj_twitter I had the same problem. It is because DotVVM Feed is already added to NuGet sources. You do not have to use nuget.exe to add the source. It is already there after sign in to Dotvvm extension. Go to Visual studio - Tools > NuGet Package Manager > Manage NuGet packages.. and select "Dotvvm feed" as package source or "All" option. You can find this select in the upper right corner of the package manager. Then you can install BusinessPack packages...
    മാഹിക്കാരൻ
    @shibinraj_twitter

    nugetUpdate.jpg

    @dnajcz Thanks for your reply. But i still face the same issue. Install button is not responding

    മാഹിക്കാരൻ
    @shibinraj_twitter
    @dnajcz Is there any Export option in the Business pack Gridview control ?
    Kit Thomas
    @kitmaxthomas_twitter
    @vaclavnovotny thank you so much.