So I am having a bit of an issue when I try to save related model data. I am adding the phoneBook sample to my current project for demonstration sake and when I try to save a person phone number i get the following error....
INFO 2017-11-10 16:46:16,524 [13 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action wcb.ScratchPad.Web.Areas.App.Controllers.PhoneBookController.AddPhone (wcb.ScratchPad.Web.Mvc) in 437.2537ms
ERROR 2017-11-10 16:46:16,697 [13 ] nostics.DeveloperExceptionPageMiddleware - An unhandled exception has occurred while executing the request
System.InvalidOperationException: The property 'Phones' on entity type 'Person' is being accessed using the 'Reference' method, but is defined in the model as a collection navigation property. Use the 'Collection' method to access collection navigation properties.
at Microsoft.EntityFrameworkCore.ChangeTracking.NavigationEntry.GetNavigation(InternalEntityEntry internalEntry, String name, Boolean collection)
at Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry`1.Reference[TProperty](Expression`1 propertyExpression)
at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.EnsurePropertyLoadedAsync[TProperty](TEntity entity, Expression`1 propertyExpression, CancellationToken cancellationToken)
at Abp.Domain.Repositories.RepositoryExtensions.<EnsurePropertyLoadedAsync>d__2`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 System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at wcb.ScratchPad.People.PersonAppService.<AddPhone>d__6.MoveNext()
Not sure why ICollection of Phones in the person entity is not considered a navigation property..
Could be the end of the day has the brain tired..
I don't seem to get any Intellisense when working with *.js files and abp app services.
Example below..
var _personService = abp.services.app.person;
Any thoughts?
Just downloaded the 4.5.1 version of aspnetzero ( Aspnet Core & Jquery 4.61 framework) and it will not build.
I am getting like 800 namespace issues and conflicting libs errors. I tried to update the packages and no good.
Suggestions?
I have updated my AspNetZero Template to the latest 4.3.1 MVC Core, Jquery, .Net 4.6.1
I am once again not able to send emails on this newer version. Previously I had this issue and I was able to resolve it by changing the UserEmailer.cs file in the Core project to implement ISMTPEmailSender instead of IEmaileSender.
Here is the link to my post on how I fixed it. #3353@c298aafa-2468-4ece-a07a-5bdd53d021f6
Here is the error:
ERROR 2017-08-18 11:21:07,043 [11 ] Mvc.ExceptionHandling.AbpExceptionFilter - The SMTP server does not support authentication.
System.NotSupportedException: The SMTP server does not support authentication.
at MailKit.Net.Smtp.SmtpClient.Authenticate(Encoding encoding, ICredentials credentials, CancellationToken cancellationToken)
at MailKit.MailService.Authenticate(String userName, String password, CancellationToken cancellationToken)
at Abp.MailKit.DefaultMailKitSmtpBuilder.ConfigureClient(SmtpClient client)
at Abp.MailKit.DefaultMailKitSmtpBuilder.Build()
at Abp.MailKit.MailKitEmailSender.BuildSmtpClient()
So I removed all Credentials and now I am back to the UserName is Null..
ERROR 2017-08-18 11:25:16,012 [32 ] Mvc.ExceptionHandling.AbpExceptionFilter - Setting value for 'Abp.Net.Mail.Smtp.UserName' is null or empty!
Abp.AbpException: Setting value for 'Abp.Net.Mail.Smtp.UserName' is null or empty!
at Abp.Net.Mail.EmailSenderConfiguration.GetNotEmptySettingValue(String name)
at Abp.Net.Mail.Smtp.SmtpEmailSenderConfiguration.get_UserName()
at Abp.MailKit.DefaultMailKitSmtpBuilder.ConfigureClient(SmtpClient client)
at Abp.MailKit.DefaultMailKitSmtpBuilder.Build()
Is smtp server authentication required ??
Is there another implementation ?
this application is an internal app and will run on private servers with a notification server inside the firewall. there is no authentication configured and uses port 25.
I am pulling my hair out on this one.. Seems simple but has me held up badly..
Can you advise?
I am running an internal site on AspNet Core mVC JQuery on framework 4.6.1.
Here are the application smtp settings (fake values of course) :
from address: <a href="mailto:[email protected]">[email protected]</a> from Name: First Last
Host: ##.##.##.## Use SSL = false Use default address: Yes
Send To address: <a href="mailto:[email protected]">[email protected]</a>
Here is the error that is generated
ERROR 2017-06-08 07:00:02,489 [27 ] Mvc.ExceptionHandling.AbpExceptionFilter - Setting value for 'Abp.Net.Mail.Smtp.UserName' is null or empty!
Abp.AbpException: Setting value for 'Abp.Net.Mail.Smtp.UserName' is null or empty!
at Abp.Net.Mail.EmailSenderConfiguration.GetNotEmptySettingValue(String name)
at Abp.Net.Mail.Smtp.SmtpEmailSenderConfiguration.get_UserName()
at Abp.MailKit.DefaultMailKitSmtpBuilder.ConfigureClient(SmtpClient client)
at Abp.MailKit.DefaultMailKitSmtpBuilder.Build()
at Abp.MailKit.MailKitEmailSender.BuildSmtpClient()
at Abp.MailKit.MailKitEmailSender.<SendAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
So here is the kicker .. I have another app that uses System.Net.Mail and no issues with the same settings and no errors..
Thoughts?
I have this really annoying issue on schema modification and add-migration..
Using Visual Studio 2017 15.2.26430.6 and AspNetZero Template AspNet.Core MVC & JQuery on Framework 4.6.1
Everytime I update the schema, add migration the update-database command will not execute because the build fails.
The error code is CS1001 Identifier expected and it is coming from a blank using statement (using;) in both the PROJECTAMEDbcontextModelSnapshot.cs file and the migration file just created from the add-migration command.
If I modify these files to remove the "using;" statements and save the build is just fine until I modify the schema again and add a migration..
Not sure if you have seen this or not but it is rather an annoying issue and would love to see if you have some feedback on it ..
So I posted having a problem earlier with the ASPNet.core MVC & JQuery version 4.0.0 and thought that syntax was the issue however i have the same problem again. Here is what I am doing.
I copy the _empty.js file from the view-resources/areas/app/views/common/modals/empty to lets say a Suppliers folder (view-resources/areas/app/views/common/modals/suppliers/)
I rename the _empty.js file to _CreateSupplierModal.js and paste the following code
(function () {
var _createSupplierModal = new app.ModalManager({
viewUrl: abp.appPath + 'App/Suppliers/CreateSupplierModal',
scriptUrl: abp.appPath + 'view-resources/Areas/App/Views/Suppliers/_CreateSupplierModal.js',
modalClass: 'CreateSupplierModal'
});
// Grab the person service for CRUD Operations
var _supplierService = abp.services.app.supplier;
//Create person button
$('#CreateNewSupplierButton').click(function (e) {
e.preventDefault();
_createSupplierModal.open();
});
})();
this modal will not fire. I have to create a new javascript file and name it something like _CreateSupplierModalWindow and use this code it works fine.
(function () {
var _createSupplierModal = new app.ModalManager({
viewUrl: abp.appPath + 'App/Suppliers/CreateSupplierModal',
scriptUrl: abp.appPath + 'view-resources/Areas/App/Views/Suppliers/_CreateSupplierModalWindow.js',
modalClass: 'CreateSupplierModal'
});
// Grab the person service for CRUD Operations
var _supplierService = abp.services.app.supplier;
//Create person button
$('#CreateNewSupplierButton').click(function (e) {
e.preventDefault();
_createSupplierModal.open();
});
})();
I have tried to delete the tainted files and re-create them but it does not work. I didn't have any problems whatsoever of this nature using Visual Studio 2015 and MVC5 version.
What are your thoughts and am I overlooking something.
I downloaded the 4.0 Core - Jquery with 4.6 framework to upgrade an existing project. and now i am getting , "Internal Error has occurred ! " on modal creation. I was perplexed so I created a new project and started copying the PhoneBook example into the new project and the same thing happens. Is there a log to view so i can see what is happening?
I am implementing a web client print utility that allows direct printing of ZPL commands to a zebra printer. These ZPL commands are built based on a product selection and typically done directly inside my controllers. Given the layering in abp would you suggest moving this action to a method in the application layer that returns the formatted command string through the service?
I'm working on an application, where I need to extend user profiles to include some application settings. What would be your best practice recommendations?
I'm thinking I should extend the user entity to include their settings then update the user profile Dto's
Thoughts?