Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "huntethan89"

In AspNet MVC template, we only have one Web project. User only have to login once and sessions is preserved in public and Mpa Area.

However in AspNet Core + jQuery template, Public and Web projects are different. How session sharing will work in this case?

We're planning to implement Web Farm for our ASPNET Zero application (MVC + jQuery, not Core). We're wondering how things like replication of uploaded files, db record locking, session state, hangfire background jobs will be handled?

AspNet Zero has many features, is there anything major that will be affected if we implement web farm?

Do we need to do any configuration in our project or it is all based on IIS, load balancer etc?

Can someone please explain things that are supported OOTB for web farm and the most infrastructure efficient way to achieve web farming?

When trying to use application service from public website gives error- Cannot read property 'app' of undefined

JS Code-

var _homeService = abp.services.app.home;
_homeService.getData({ pageNumber: 0 })
    .done(function (data) {
        console.log(data);
    });

Is there any way to allow application services to be accessible from public website? Template is Core+jQuery

Dynamic Web API works great but I was wondering whether dynamic OData is also available or not?

If it is available, please share the link for ASPNET Zero documentation.

I checked ASPNET Boilerplate documentation and it looks like we have to write OData for every entity unlike web api which are generated automatically.

Thanks

We are using AD FS as primary method of authentication for our web project.

We are now developing a native iOS app. For development, we used token based authentication as described here- https://docs.aspnetzero.com/documents/zero/latest/Development-Guide-Mvc-Angularjs#authentication This method requires credentials that are stored in database to authenticate user.

Now that we want to move to production with our application, we must change the authentication method to AD FS. So requirements are that the user should authenticate to web api using AD FS, retrieve token and make further requests using that token.

Is this available somewhere in documentation? How can we achieve this?

Question

I tried following code to enable CORS but when I'm calling api from another domain, it is still giving error-

public override void Initialize()
{
    IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());

    // Enabling CORS: 
    var cors = new EnableCorsAttribute(origins: "*", headers: "*", methods: "*");
    Configuration.Modules.AbpWebApi().HttpConfiguration.EnableCors(cors);

    //Automatically creates Web API controllers for all application services of the application
    Configuration.Modules.AbpWebApi().DynamicApiControllerBuilder
        .ForAll<IApplicationService>(typeof(ProjectLearnApplicationModule).Assembly, "app")
        .Build();            

    Configuration.Modules.AbpWebApi().HttpConfiguration.Filters.Add(new HostAuthenticationFilter("Bearer"));

    ConfigureSwaggerUi(); //Remove this line to disable swagger UI.
}

Do I need to make modifications at any other place? I'm using ASPNET MVC + jQuery

Hi I am trying to use SQL dependency for my Project but it is not running on Asp.Net Zero Environment . I mean i have tried with new blank database or with other .Net Applications it is working fine . but when i am trying to do with Asp.Net Zero Application with Code first then it is not working . Database not firing any notification on data change , Even i have Enable Broker service also . Can anyone help me for this ? I want to use it for update notification for other reason not for Chat .

Hi,

We have a jtable which have some columns whose value is calculated based on some conditions.

For example-

var documents = await documentsQuery
    .OrderBy(input.Sorting)
    .PageBy(input)
    .Select(x => new DocumentListDto
    {
        Id = x.Id,
        Title = x.Title,
        File_Size_Presenter = x.File_Size + " KB",
        Document_Approval_Type = x.Entity_Document_Approval_Types.Approval_Type,
        Document_Approval_Type_ID_FK = x.Document_Approval_Type_ID_FK,
        CreationTime = x.CreationTime,
        Approvers = x.Entity_Approvers.Count(),
        Status = x.Is_Publish ? "Published" :
                    x.Document_Approval_Type_ID_FK == (int)Entity_Document_Approval_Types.DEFAULT_TYPES.Sequential ?
                    (x.Entity_Approvers.Count(a => a.Approver_Type_ID_FK == (int)Entity_Approvers_Types.DEFAULT_TYPES
                    .Basic) == x.Entity_Approvers.Count(a => a.Is_Approved == true && a.Approver_Type_ID_FK == (int)Entity_Approvers_Types.DEFAULT_TYPES
                    .Basic) ? "Approved" : "In progress") // Sequential
                    :
                    (x.Approvers_Required <= (x.Entity_Approvers.Count(a => a.Is_Approved == true && a.Approver_Type_ID_FK == (int)Entity_Approvers_Types.DEFAULT_TYPES
                    .Basic)) ? "Approved" : "In progress"), // Numbered
        Status2 = x.Is_Publish ? "Document has been published" :
                    x.Document_Approval_Type_ID_FK == (int)Entity_Document_Approval_Types.DEFAULT_TYPES.Sequential ?
                        (x.Entity_Approvers.Count(a => a.Approver_Type_ID_FK == (int)Entity_Approvers_Types.DEFAULT_TYPES
                        .Basic) == x.Entity_Approvers.Count(a => a.Is_Approved == true && a.Approver_Type_ID_FK == (int)Entity_Approvers_Types.DEFAULT_TYPES
                        .Basic) ?
                        x.Entity_Approvers.FirstOrDefault(a => a.Approver_Type_ID_FK == (int)Entity_Approvers_Types.DEFAULT_TYPES
                        .Original_Writer).Is_Approved != true ? "Waiting on original writer" : "Waiting final publishing"
                        : "Waiting on approvers") // Sequential
                    :
                        (x.Approvers_Required <= (x.Entity_Approvers.Count(a => a.Is_Approved == true && a.Approver_Type_ID_FK == (int)Entity_Approvers_Types.DEFAULT_TYPES
                        .Basic)) ? x.Entity_Approvers.FirstOrDefault(a => a.Approver_Type_ID_FK == (int)Entity_Approvers_Types.DEFAULT_TYPES
                        .Original_Writer).Is_Approved != true ? "Waiting on original writer" : "Waiting final publishing" : "Waiting on approvers"), // Numbered

        Author = x.AbpUser_OriginalWriterUser.Name + " " + x.AbpUser_OriginalWriterUser.Surname,
        DocumentAdmin = x.AbpUser_DocumentAdminUser.Name + " " + x.AbpUser_DocumentAdminUser.Surname
    })
    .ToListAsync();

Here, columns like Status, Status2, Author, DocumentAdmin does not exists in database. Applying filter on them would mean to first fetch all data and then filter it, which does not seem like any efficient way. We are also using paging and sorting and we cannot lose this functionality. (Sorting is not working on calculated columns. So, as a bonus, if you have a solution to that, it'll be much appretiated :) )

I believe many of you, like me, would have banged your head on wall to do this correctly. So, how could this be handled in an elegant way?

Thanks!

I have implemented ADFS login. When I open my website directly e.g. <a class="postlink" href="https://sub.dev.com">https://sub.dev.com</a>, it redirects to login page at /Account/Login. On this page, we are clicking on ADFS login button using jQuery which redirects user to ADFS login page. Upon successful login, user is redirected back to website. This works perfectly.

I have issue when user opens website using relative URL directly, e.g. <a class="postlink" href="https://sub.dev.com/Mpa/Documents">https://sub.dev.com/Mpa/Documents</a> User is automatically redirected to ADFS login page. When user login from ADFS, it goes into redirection loop between my website and ADFS.

Looks like authentication cookie is not getting saved in website and because of this after login from ADFS, it redirects back to Mpa/Documents page and it detects the request is unauthenticated and redirects user back to ADFS. ADFS already authenticated so it redirects back Mpa/Documents and so on. Hence it fails after couple of calls and ADFS gives me error.

How is /Mpa/Documents know it is unauthenticated request? Anybody know how this can be resolved?

Results from fiddler are below-

Is Paypal integration for tenant subscriptions not available for the MVC + jQuery template? I am not able to find it anywhere.

Showing 41 to 50 of 80 entries