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

Activities of "exlnt"

I just downloaded the Asp.Net Core MVC version of my ASPNETZERO solution. When I open the solution, I am getting the below error during NuGet package restore.

I did find another posting on this same issue and I forced HangFire 1.6.8 in all three projects, but still the errors remain.

Errors in \ASPNETZERO\Ops\src\Ops.Web.Mvc\Ops.Web.Mvc.xproj
    Version conflict detected for Hangfire.Core.
     Ops.Web.Mvc (>= 1.0.0) -> Ops.Web.Core (>= 1.0.0) -> Abp.HangFire (>= 1.2.2) -> Hangfire.Core (>= 1.6.8)
     Ops.Web.Mvc (>= 1.0.0) -> Ops.Web.Core (>= 1.0.0) -> Hangfire.SqlServer (>= 1.6.7) -> Hangfire.Core (= 1.6.7).
Errors in \ASPNETZERO\Ops\src\Ops.Web.Host\Ops.Web.Host.xproj
    Version conflict detected for Hangfire.Core.
     Ops.Web.Host (>= 1.0.0) -> Ops.Web.Core (>= 1.0.0) -> Abp.HangFire (>= 1.2.2) -> Hangfire.Core (>= 1.6.8)
     Ops.Web.Host (>= 1.0.0) -> Ops.Web.Core (>= 1.0.0) -> Hangfire.SqlServer (>= 1.6.7) -> Hangfire.Core (= 1.6.7).
Errors in \ASPNETZERO\Ops\src\Ops.Web.Core\Ops.Web.Core.xproj
    Version conflict detected for Hangfire.Core.
     Ops.Web.Core (>= 1.0.0) -> Abp.HangFire (>= 1.2.2) -> Hangfire.Core (>= 1.6.8)
     Ops.Web.Core (>= 1.0.0) -> Hangfire.SqlServer (>= 1.6.7) -> Hangfire.Core (= 1.6.7).

Can you help me resolve these errors? Thanks!

I just ran the NuGet package manager console command to update ALL my ABP NuGet packages.

get-project -all | get-package | ?{ $_.Id -like 'Abp*' } | update-package

After the NuGet updates, I built the solution and I am getting the errors in just two "typescript" files. I am not at all familiar with typescript.

Build Errors: [https://drive.google.com/file/d/0BzbrPy41GhA4UGpnT0NSODJJVDg/view?usp=sharing])

Can you please tell me how to resolve these errors? Thanks!

I tried to setup a new tenant on my hosted application. I used the create tenant UI to setup the new tenant. The DB was created and all the tables were created in the new DB instance. However the process did not complete normally. The ABP app reported the error message below in the logs.

System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.Transactions.TransactionManagerCommunicationException: Network access for Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for network access in the security configuration for MSDTC using the Component Services Administrative tool. ---> System.Runtime.InteropServices.COMException: The transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D024)

I spoke with my hosting support team about this error and if this feature can be enabled. They replied with below.

Unfortunately, MSDTC is not a supported feature on our hosting platform. You can probably find very few shared hosting providers supporting this feature. You should consider using SQL server's native transaction support.

Is there any other method for me to create the tenant?

I have deployed my ABP application to my hosting providers site. I have updated the email settings as needed for my hosting provider. The test email is working fine for email addresses on my domain. However, when I try to send out emails to any other domain, I keep getting the error below.

System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: Authentication is required for relay
   at System.Net.Mail.SendMailAsyncResult.End(IAsyncResult result)
   at System.Net.Mail.SmtpTransport.EndSendMail(IAsyncResult result)
   at System.Net.Mail.SmtpClient.SendMailCallback(IAsyncResult result)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Abp.Net.Mail.Smtp.SmtpEmailSender.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Abp.Net.Mail.EmailSenderBase.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Abp.Net.Mail.EmailSenderBase.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Abp.Net.Mail.EmailSenderBase.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Configuration.Host.HostSettingsAppService.d__21.Mo...

I opened a ticket with my hosting provider's support team. They have replied with the below response.

Yes, I know it works from your domain name because that is sent internally. I tested that, and it works fine. In order to relay out, you need to authenticate (i.e. supply username and password), or our mail servers won't relay it out (we don't allow unauthenticated users to send messages out because of spammers which get our mail servers blacklisted). I could probably place a test script in your account to prove to you that it's working, but that's not the problem. The problem is that your CMS (ASPNetZero) is not authenticating correctly, but I don't know where the code is to send email so I can't verify that's the problem.

I searched on the forum for other postings on the issue and found some of the email code. However I could not find the code where the credentials are getting used. Can you help me resolve this issue? Thanks!

I copied an existing Index page from my ABP application that works perfectly. I simply changed the entity name, service name and updated the columns in the JTable grid layout. My controller codes looks exactly the same as the working page code. Yet when this new page runs and you view the index page, it renders fine, but the JTable "Loading" never stops and it never reaches my app service method to get the data. When I look the console in Chrome I see the below error. Can someone please tell me why this error is happening and how to resolve?

[attachment=0:3q3y4tki]Screenshot (25).png[/attachment:3q3y4tki]

Thanks!

I have the following entity in my solution:

public class Company : FullAuditedEntity<int>
    {
        [Required]
        [MinLength(2)]
        [MaxLength(48)]
        public virtual string CompanyName { get; set; }

        [Required]
        [MinLength(2)]
        [MaxLength(48)]
        public virtual string CompanyLegalName { get; set; }

        [MaxLength(48)]
        public virtual string CompanyTaxId { get; set; }

       //some others properties removed to keep this simple

        [Required]
        public virtual bool ActiveYesNo { get; set; }
     
    }

My application design keeps ALL addresses for company and any other entity in one master Address table, defined below.

public class Address : FullAuditedEntity<Int64>
    {
        [Required]
        [MaxLength(10)]
        public virtual string AddressType { get; set; }

        [Required]
        [MinLength(5)]
        [MaxLength(100)]
        public virtual string AddressLine1 { get; set; }

        [Required]
        [MinLength(3)]
        [MaxLength(100)]
        public virtual string City { get; set; }

        [Required]
        public virtual Country Country { get; set; }

        [Required]
        [MaxLength(10)]
        public virtual string PostalCode { get; set; }

        [Required]
        public virtual bool DefaultYN { get; set; }

    }

So in order to maintain the multiple addresses for the company entity, I have the table below.

public class CompanyAddress : Entity
    {
        public virtual Company Company { get; set; }
        public virtual Address Address { get; set; }
    }

Then I added this property into the company table.

public virtual CompanyAddress Addresses { get; set; }

After that, when I run the "Add-Migration" command I get this error:

Unable to determine the principal end of an association between the types 'CompanyAddress' and 'Company'. The principal end of this association must be explicitly configured using either the relationship fluent API or data annotations

Then after a google search for the error, I found this post: [http://stackoverflow.com/questions/6531671/what-does-principal-end-of-an-association-means-in-11-relationship-in-entity-fr])

After reading that, I applied the below change to companyAddress table:

public class CompanyAddress : Entity
    {
        [Required]
        public virtual Company Company { get; set; }
        public virtual Address Address { get; set; }
    }

This allowed me to complete the "Add-Migration" command without any errors.

Here is the code for the migration:

public override void Up()
        {
            DropIndex("dbo.app_CompanyAddress", new[] { "Company_Id" });
            DropColumn("dbo.app_CompanyAddress", "Id");
            RenameColumn(table: "dbo.app_CompanyAddress", name: "Company_Id", newName: "Id");
            DropPrimaryKey("dbo.app_CompanyAddress");
            AlterColumn("dbo.app_CompanyAddress", "Id", c => c.Int(nullable: false));
            AlterColumn("dbo.app_CompanyAddress", "Id", c => c.Int(nullable: false));
            AddPrimaryKey("dbo.app_CompanyAddress", "Id");
            CreateIndex("dbo.app_CompanyAddress", "Id");
        }
        
        public override void Down()
        {
            DropIndex("dbo.app_CompanyAddress", new[] { "Id" });
            DropPrimaryKey("dbo.app_CompanyAddress");
            AlterColumn("dbo.app_CompanyAddress", "Id", c => c.Int());
            AlterColumn("dbo.app_CompanyAddress", "Id", c => c.Int(nullable: false, identity: true));
            AddPrimaryKey("dbo.app_CompanyAddress", "Id");
            RenameColumn(table: "dbo.app_CompanyAddress", name: "Id", newName: "Company_Id");
            AddColumn("dbo.app_CompanyAddress", "Id", c => c.Int(nullable: false, identity: true));
            CreateIndex("dbo.app_CompanyAddress", "Company_Id");
        }

However, when I apply the "Update-Database" command, I get the following error:

The object 'PK_dbo.app_CompanyAddress' is dependent on column 'Id'.
ALTER TABLE DROP COLUMN Id failed because one or more objects access this column.

Can you please tell me what I am doing wrong or what I am missing in order to setup this relationship properly? Thanks!

In my Edit modal I have these hidden fields

<input type="hidden" name="Id" value="@Model.Company.Id" />
<input type="hidden" name="CompanyName" value="@Model.Company.CompanyName" />
<input type="hidden" name="Note.Id" value="@Model.Company.Note.Id" />

Here is the model that is returned to my UpdateCompany method: [attachment=0:167vzn0s]Screenshot (16).png[/attachment:167vzn0s] As you can see above the Note.Id is always coming back as NULL to the UpdateCompany method in CompanyAppService.

When I change the name of this field, in the HTML, to "Id", it overlays the "Company Id" column so that does not work.

<input type="hidden" name="Note.Id" value="@Model.Company.Note.Id" />

How can I get the page to return both ID numbers back to my app service method?

Thanks!

The AutoMap function is failing and throwing an error on my edit DTO to entity mapping.

You can see my "company" entity and the "EditCompanyDto" here: [https://drive.google.com/open?id=0BzbrPy41GhA4VGFLUThtVDJMblE])

When my edit modal is opened and the query is executed and then results are mapped to "EditCompanyDto" I get the below error message.

<span style="color:#FF0000">Mapping types: List1 -> EditCompanyDto System.Collections.Generic.List1[[EXLNT.NursingOps17.NursingOps.Dto.EditCompanyDto, EXLNT.NursingOps17.Application, Version=1.13.0.0, Culture=neutral, PublicKeyToken=null]] -> EXLNT.NursingOps17.NursingOps.Dto.EditCompanyDto at lambda_method(Closure , Object , Object , ResolutionContext ) at AutoMapper.Mapper.AutoMapper.IMapper.Map[TDestination](Object source) at AutoMapper.Mapper.Map[TDestination](Object source) at Abp.AutoMapper.AutoMapExtensions.MapTo[TDestination](Object source) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.AutoMapper\AutoMapper\AutoMapExtensions.cs:line 15 </span>

The last line in the method below generates the error message.

public async Task<EditCompanyDto> GetCompanyForEdit(EntityDto input)
        {
            var query = CompanyEditQuery(input);
            var results = await query.ToListAsync();
            var companyEditDtos = ConvertToCompanyEditDtos(results);
            //The line below generates the mapping error
          return companyEditDtos.MapTo<EditCompanyDto>();
      }

In my custom entity edit modal view, I have a dropdownlist to select currency code. The dropdown is getting bound with all the values just fine. However, the dropdown is not showing the selected value on the record being edited, instead it always shows the seed value?

This is my controller method for EditModal:

public async Task<PartialViewResult> EditModal(int id)
        {
            var companyEditDto = await _companyAppService.GetCompanyForEdit(new EntityDto(id));
            var currencyCodes = _listValuesAppService.GetListValuesComboboxItems("CurrencyCode");
            var viewModel = new EditCompanyViewModel(companyEditDto, currencyCodes);
            return PartialView("_EditModal", viewModel);
        }

This is my CSHTML for my dropdown:

@Html.DropDownList("CurrencyCode", Model.CurrencyCodes.Select(i => i.ToSelectListItem()), new { @class = "form-control edited"})

Here is the rendered output of my edit modal: [attachment=0:3d74sk3g]Screenshot (36).png[/attachment:3d74sk3g]

I have followed the design pattern of the ABP solution and gotten the index and create functions working for my custom entity "company". I have created all the proper layers with classes as per the design pattern of the ABP template. When the create modal is displayed and the user clicks save without filling in all required fields the JS validation works and highlights two of the four fields. The validation refuses to work for the other two fields.

The PDF document here shows all the relevant code and screenshot: [https://drive.google.com/open?id=0BzbrPy41GhA4SWdEWXZGSHRfbU0])

Can you please guide me to what I am missing and/or why the validation is not working for the other two fields?

Thanks!

Showing 41 to 50 of 53 entries