Base solution for your next web application

Activities of "dev1_premierpoint"

Appreciate the help. It was challenging to find information online about this one. Quite of few examples of more standard modal usage, but no examples that worked with the boilerplate you've got going on here.

Product version: ASP.NET Zero v9.1 Product type: MVC & jQuery Product framework type: .NET Core

I am trying to pass information into a modal (a UUID in order to lookup an object once I have the modal open and an integer that is actually a language code), and I'm not sure if there is an interaction with the modalManager that is used to create these modals that is preventing more standard methods of passing information from working or if I have some other problem.

I've tried having hidden fields on the page that I populate by trying to set the value of those fields in the on click method. example: $('#btnCreateNewLabel').on('click', async function () { $(".modal-body #syncPointId").val(syncPointID); .... With #syncPointId being one of the fields on the modal in this example. This method never seems to pass anything into the modal.

I've tried something similar with the on 'show.bs.modal' event example: $('#CreateOrEditLabelModal').on('show.bs.modal', function (e) { $(e.currentTarget).find('input[name="syncPointId"]').val(syncPointID)

I guess I am wondering if there is a method that works better with the ModalManager that I am unaware of or if there is an issue with my setup.

Something that may be important to note is that the page is already currently in a modal when I am trying to pass this information into another smaller modal.

I thought there might be another file I needed to edit. There doesn't seem to be anything here for the new modal.


using System; using System.Threading.Tasks; using Abp.AspNetCore.Mvc.Authorization; using Microsoft.AspNetCore.Mvc; using Pol.Web.Areas.App.Models.SyncPoints; using Pol.Web.Controllers; using Pol.Authorization; using Pol.TermSync; using Pol.TermSync.Dtos; using Abp.Application.Services.Dto; using Abp.Extensions;

namespace Pol.Web.Areas.App.Controllers { [Area("App")] [AbpMvcAuthorize(AppPermissions.Pages_SyncPoints)] public class SyncPointsController : PolControllerBase { private readonly ISyncPointsAppService _syncPointsAppService;

    public SyncPointsController(ISyncPointsAppService syncPointsAppService)
    {
        _syncPointsAppService = syncPointsAppService;
    }

    public ActionResult Index()
    {
        var model = new SyncPointsViewModel
		{
			FilterText = ""
		};

        return View(model);
    } 
   

		 [AbpMvcAuthorize(AppPermissions.Pages_SyncPoints_Create, AppPermissions.Pages_SyncPoints_Edit)]
		public async Task<PartialViewResult> CreateOrEditModal(string id)
		{
			GetSyncPointForEditOutput getSyncPointForEditOutput;

			if (!id.IsNullOrWhiteSpace()){
				getSyncPointForEditOutput = await _syncPointsAppService.GetSyncPointForEdit(new EntityDto<string> { Id = (string) id });
			}
			else {
				getSyncPointForEditOutput = new GetSyncPointForEditOutput{
					SyncPoint = new CreateOrEditSyncPointDto()
				};
			getSyncPointForEditOutput.SyncPoint.lastRun = DateTime.Now;
			}

			var viewModel = new CreateOrEditSyncPointModalViewModel()
			{
				SyncPoint = getSyncPointForEditOutput.SyncPoint,                
			};

			return PartialView("_CreateOrEditModal", viewModel);
		}
		

    public async Task<PartialViewResult> ViewSyncPointModal(string id)
    {
		var getSyncPointForViewDto = await _syncPointsAppService.GetSyncPointForView(id);

        var model = new SyncPointViewModel()
        {
            SyncPoint = getSyncPointForViewDto.SyncPoint
        };

        return PartialView("_ViewSyncPointModal", model);
    }


}

}


I guess that I need a new task here for the new modal?

Product version: ASP.NET Zero v9.1 Product type: MVC & jQuery Product framework type: .NET Core

I am trying to put a handmade CreateAndEditModal inside of a pregenerated one for one of our RAD tool created entities. Similar to how the default C&E modal is loaded from some form of create new button on the index page, I have a create button that is meant to open up my new modal. when I attempt to open it up however I get a 404 error in the console.

This is the section in the js file where I am declaring the modal: var _createOrEditLabelModal = new app.ModalManager({ viewUrl: abp.appPath + 'App/SyncPoints/CreateOrEditLabelModal', scriptUrl: abp.appPath + 'view-resources/Areas/App/Views/SyncPoints/_CreateOrEditLabelModal.js', modalClass: 'CreateOrEditLabelModal', modalSize:'modal-m' });

And this is the how the original modal is declared in the javaScript of the index page: var _createOrEditModal = new app.ModalManager({ viewUrl: abp.appPath + 'App/SyncPoints/CreateOrEditModal', scriptUrl: abp.appPath + 'view-resources/Areas/App/Views/SyncPoints/_CreateOrEditModal.js', modalClass: 'CreateOrEditSyncPointModal', modalSize: 'modal-xl' });

The files are in the same folders, so I don't think I messed up the paths in the declaration.

Product version: ASP.NET Zero v9.1 Product type: MVC & jQuery Product framework type: .NET Core

I have IdentityServer4 (3.x version) working in my application. I was able to build and test the OpenId Connect MVC test client app you provide in Github. Followed this page in your documentation to configure both sides and got it working:

https://docs.aspnetzero.com/en/aspnet-core-mvc/latest/Infrastructure-Core-Mvc-Identity-Server4-Integration

It works fine in Dev with multi-tenancy enabled in my ASP.NET Zero application because I can use the tenant picker control on the ASP.NET Zero Login page to select the tenant to login to when using OpenId Connect.

However, I don't see how it can work in a production ASP.NET Zero multi-tenant enviroment when each tenant will have their own subdomain using the ASP.NET Zero approach to multi-tenancy.

In the OpenId Connect MVC test client it is necessary to specify the OpenId Connect Authority Url. In Dev, I just specify the localhost Url that the ASP.NET Zero application is running on (for instance, https://localhost:44302).

In production, per the way ASP.NET Zero handles multi-tenancy, a user for a tenant named "T1" would need to authenticate at T1.publicdomainname.com. A user for a tenant named "T2" would need to authenticate at T2.publicdomainname.com. And so on.

It seems like the only way this would work on the OpenId Connect client side is if the client is able to support building the OpenId Connect Authority Url dynamically based on target ASP.NET Zero application's tenant Url.

Is this the way IdentityServer4 and OpenIdConnect and ASP.NET Zero Multi-Tenancy are intended to work together?

If so, if my ASP.NET Zero app is trying to be the Identity Provider for other client apps that integrate with it for single sign-on purposes, those other apps have to have the ability to dynamically generate the OpenID Connect Authority Url based on the tenant user is a membe of. That seems like an unlikely feature for a 3rd-party OpenId Connect client app to support unless I am missing something?

Thanks.

That's perfect. Thanks for the help.

While those different sizes do work (ismcagdas), the CreateAndEditModal partial pages are used, so the only part of the modal that is editable is the modal body and everything inside of that. I have found the partial for the header and footer, but I'm not sure where to find the outermost layer of the dialog is set up and how I can change that for just this create modal.

In other words, the div that I can edit the classes of is the modal with class modal-body, but when the page loads, it is wrapped inside of the div with classes modal-dialog and modal-lg. I'm not sure where to find where this is put together, and I am afraid that wouldn't resolve my issue even if I did find it since I do not want to change that for every modal that uses the same predefined code.

Using Asp.Net Core MVC+ Jquery and Metronic.

I am looking to give more room when inside one of the create and edit modals, and I would like to try and just increase the size of the modal before I resort to using the documentation to convert the modal to a full mvc page.

I'm going to look through the metronic documentation to see if I can find an example there.

Any help in pointing the right would be appreciated, whether it be in the metronic stuff or an example in the aspnet zero examples.

I don't understand why this message is not shown in the RAD Tool log file (Logs.txt)? I spent a good bit of time trying different things and then finally searched this forum and found this post. Seems like if the .NET Core 2.2 runtime is missing, that should be validated when installing the RAD tools OR, at least, should throw an error in the RAD Tool log file when trying to generate. This is all I get in the Logs.txt file:

DEBUG 2020-12-23 12:42:34,934 [1 ] lVisualStudioExtension.AspNetZeroRadTool - Menu item clicked with params > loadFromJson: False, loadFromDatabase: False, showAboutForm: False DEBUG 2020-12-23 12:46:30,063 [1 ] dioExtension.Dialogs.EntityGeneratorForm - Generate entity started. DEBUG 2020-12-23 12:46:30,813 [1 ] dioExtension.Dialogs.EntityGeneratorForm - Entity successfully generated.

Not useful at all to troubleshooting this problem.

I just got this error too and it ended up consuming about 8 hours of time until I somehow stumbled across this closed question via a google search.

The answer above is the solution - add the value "src" in the Working Directory field in the Advanced section of the Generate Migration Scripts Task:

It would be nice if Volosoft added this as a tip to this page of the documentation:

https://docs.aspnetzero.com/en/aspnet-core-mvc/latest/Setting-Up-an-Azure-Pipeline-Mvc-Core

Showing 1 to 10 of 63 entries