Base solution for your next web application

Activities of "panic"

Hello, After contacting StimulSoft, I provided a sample project, and they found a solution for this problem. In the Report Viewer cshtml file, please add the below code to intercept and manually add antiforgery token:

<script>

    jsstiMvcViewer.openConnection = function (http, url, responseType) {
    
    http.open("POST", url);
    http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    http.responseType = responseType ? responseType : "text";
    http.setRequestHeader(abp.security.antiForgery.tokenHeaderName, abp.security.antiForgery.getToken());
}

</script>

.. I found some explanation in this link [https://github.com/aspnetboilerplate/aspnetboilerplate/issues/3034])

Hello, Do you mean that instead of this:

<script src="~/view-resources/Areas/App/Views/Banking/Create.js" asp-append-version="true"></script>

If I use this:

<script abp-src ="~/view-resources/Areas/App/Views/Banking/Create.js" asp-append-version="true">

It will automatically load Create.min.js if exists, otherwise it will just load Create.js ?

Is there any documentation regarding "<script abp-src" and "<link abp-href ... />"? Many thanks,

Panayiotis.

Hello, I am using the Asp.Net Core+JQuery, full .net. Should we manually add code to include (or not) minified versions of js/css files in our views? Additionally, I noticed that for modal views (like _CreateOrEditModal.cshtml) you already generate minified versions of their js files (_CreateOrEditModal.min.js). Below code is to define a js variable for the modal. Can I select js file for scriptUrl according to value of env.name variable ASPNETCORE_ENVIRONMENT?

var _createOrEditModal = new app.ModalManager({
            viewUrl: abp.appPath + 'App/Languages/CreateOrEditModal',
            scriptUrl: abp.appPath + 'view-resources/Areas/App/Views/Languages/_CreateOrEditModal.js',  //Can I select minified js according to env.name variable ASPNETCORE_ENVIRONMENT if set to Development or Production
            modalClass: 'CreateOrEditLanguageModal'
        });

Many thanks,

P.

* How to handle loading minified versions if on Dev or Prod environments.

@section Scripts
    {
    <environment names="Development">
        <script src="~/view-resources/Areas/App/Views/Banking/Create.js" asp-append-version="true"></script>
    </environment>
    <environment names="Production;Staging">
        <script src="~/view-resources/Areas/App/Views/Banking/Create.min.js" asp-append-version="true"></script>
    </environment>
}
@section Styles
    {
    <environment names="Development">
        <link rel="stylesheet" href="~/view-resources/Areas/App/Views/Banking/Create.css" asp-append-version="true" />
    </environment>
    <environment names="Production;Staging">
        <link rel="stylesheet" href="~/view-resources/Areas/App/Views/Banking/Create.min.css" asp-append-version="true" />
    </environment>
}

Hello, And thank you for pointing out relevant topics. To my opinion, public website should be published under <a class="postlink" href="http://www.domain.com">http://www.domain.com</a> where admin website should be published under a subdomain like admin.domain.com. Good day,

P.

Hello, I have successfully deployed a release of the admin web application, however, I don't know how I should deploy the public website on the same domain like the admin website. Both admin and public websites should be under the same domain, same ip and same port, right? ..but this is not accepted by IIS. What do you suggest? Many thanks,

Panayiotis.

Hello, According to this publish guide, [https://www.aspnetzero.com/Documents/Step-by-step-publish-to-azure-core-mvc]), we need to issue command gulp -prod to bundle and minify the js/css files. However, I noticed the change in latest version 5.50 of running command: npm run create-bundles. Is this command for both dev and production bundling and minification? Is there any other settings that have changed in regards to production publishing? Many thanks,

Panayiotis.

Thank you very much Aaron. Have a good day!

Hello, I have a model PropertyBlock which has a parent called PropertyMaster, and also has child models called PropertyUnits. When I call

var propertyBlock = await _propertyBlockRepository.GetAsync(input.Id);

then the parent PropertyMaster is not loaded and also the children collection of PropertyUnits is empty. How can I ask to explicitly load these? Can you please give me some examples of the repository extension methods: EnsureCollectionLoaded<TEntity, TPrimaryKey, TProperty> EnsureCollectionLoadedAsync<TEntity, TPrimaryKey, TProperty> EnsurePropertyLoaded<TEntity, TPrimaryKey, TProperty> EnsurePropertyLoadedAsync<TEntity, TPrimaryKey, TProperty>

Many thanks!

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities.Auditing;
using System.Collections.Generic;

namespace MyPropMan.Entities
{
	[Table("PropertyBlock")]
    public partial class PropertyBlock : FullAuditedEntity
    {
		public const int MaxShortidLength     = 55;
		public const int MaxPropnameLength    = 155;
		public const int MaxTypeofLength   	  = 65;
        public const int MaxAddressLength     = 655;
		public const int MaxPostalAreaLength  = 115;
		public const int MaxPostalCodeLength  = 25;
		public const int MaxCityCountryLength = 95;
        public const int MaxTextLength 	 	  = 555;

        public PropertyBlock()
        {
            Banking = new HashSet<Banking>();
            Bill = new HashSet<Bill>();
            Fee = new HashSet<Fee>();
            Journal = new HashSet<Journal>();
            Payment = new HashSet<Payment>();
            PropertyAccount = new HashSet<PropertyAccount>();
            PropertyExpenditure = new HashSet<PropertyExpenditure>();
            PropertyBudget = new HashSet<PropertyBudget>();
            PropertyExpense = new HashSet<PropertyExpense>();
            PropertyUnit = new HashSet<PropertyUnit>();
            PropertyVendor = new HashSet<PropertyVendor>();
            Receipt = new HashSet<Receipt>();
            Statement = new HashSet<Statement>();
        }

        public int Propertymasterid { get; set; }

		[MaxLength(MaxShortidLength)]
        public string Shortid { get; set; }

		[MaxLength(MaxPropnameLength)]
        public string Name { get; set; }

		[MaxLength(MaxAddressLength)]
        public string Address { get; set; }

		[MaxLength(MaxPostalAreaLength)]
        public string Postalarea { get; set; }

		[MaxLength(MaxPostalCodeLength)]
        public string Postalcode { get; set; }

		[MaxLength(MaxCityCountryLength)]
        public string City { get; set; }

		[MaxLength(MaxCityCountryLength)]
        public string Country { get; set; }

		[MaxLength(MaxTypeofLength)]
        public string Typeof { get; set; }

        public short Blockunits { get; set; }

        public bool? Isowncostcentre { get; set; }

        public bool? Isactive { get; set; }

		[MaxLength(MaxTextLength)]
        public string Textnote { get; set; }

        public PropertyMaster Propertymaster { get; set; }
        public ICollection<Banking> Banking { get; set; }
        public ICollection<Bill> Bill { get; set; }
        public ICollection<Fee> Fee { get; set; }
        public ICollection<Journal> Journal { get; set; }
        public ICollection<Payment> Payment { get; set; }
        public ICollection<PropertyAccount> PropertyAccount { get; set; }
        public ICollection<PropertyExpenditure> PropertyExpenditure { get; set; }
        public ICollection<PropertyBudget> PropertyBudget { get; set; }
        public ICollection<PropertyExpense> PropertyExpense { get; set; }
        public ICollection<PropertyUnit> PropertyUnit { get; set; }
        public ICollection<PropertyVendor> PropertyVendor { get; set; }
        public ICollection<Receipt> Receipt { get; set; }
        public ICollection<Statement> Statement { get; set; }
    }
}

Answer

Thank you very much!

Showing 1 to 10 of 27 entries