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

Activities of "michaelhilgers"

Hi,

I created a class "CustomSettings", I added the class as IDbSet<> to the EF-Projekts class DbContext

but if I run the "dotnet ef migrations add "Added_CustomSettings_Table", the created Migrtion file is empty.

class:

[Table("CustomSettings")]
    public class CustomSettings : Abp.Domain.Entities.Auditing.FullAuditedEntity<long>
    {
        [Required]
        [Column(TypeName = "NVARCHAR(Max)")]
        public string Name { get; set; }

        public int? TenandId { get; set; }

        [ForeignKey(nameof(TenandId))]
        public virtual Tenant Tenant { get; set; }

        public long? UserId { get; set; }

        [ForeignKey(nameof(UserId))]
        public virtual Abp.Authorization.Users.UserAccount User { get; set; }

        [Column(TypeName = "NVARCHAR(Max)")]
        public string ValueAsString { get; set; }

        public byte[] ValueAsBinary { get; set; }

        public decimal? ValueAsDecimal { get; set; }
    }

EntityFramework Projekt:

[DbConfigurationType(typeof(PMDbConfiguration))]
    public class PMDbContext : AbpZeroDbContext<Tenant, Role, User>
    {
        /* Define an IDbSet for each entity of the application */

        public virtual IDbSet<BinaryObject> BinaryObjects { get; set; }

        public virtual IDbSet<Friendship> Friendships { get; set; }

        public virtual IDbSet<ChatMessage> ChatMessages { get; set; }

        public virtual IDbSet<CustomSettings.CustomSetting> CustomSettings { get; set; }

        /* Default constructor is needed for EF command line tool. */
        public PMDbContext()
            : base(GetConnectionString())
        {
        }

Result Migration file :

public partial class Added_Settings_Table : DbMigration
    {
        public override void Up()
        {
        }
        
        public override void Down()
        {
        }
    }

Could you help me please !?

Hello,

I've got the following error if I run the unittest on my TFS-server. Error Message: 2017-01-23T08:10:58.9421026Z ##[error] System.Net.Mail.SmtpException : Failure sending mail. 2017-01-23T08:10:58.9421026Z ##[error]---- System.Net.WebException : Unable to connect to the remote server 2017-01-23T08:10:58.9421026Z ##[error]-------- System.Net.Sockets.SocketException : No connection could be made because the target machine actively refused it 127.0.0.1:25

The error threw on the "Tests.Authorization.Accounts.AccountAppService_Tests.Should_Register" function but if I run the test on my local machine they passed all without errors.

2017-01-23T08:06:07.0135202Z ##[section]Starting: Test Assemblies \release***Tests.dll;-:\obj** 2017-01-23T08:06:07.0293371Z ============================================================================== 2017-01-23T08:06:07.0293371Z Task : Visual Studio Test 2017-01-23T08:06:07.0293371Z Description : Run tests with Visual Studio test runner 2017-01-23T08:06:07.0293371Z Version : 1.0.84 2017-01-23T08:06:07.0293371Z Author : Microsoft Corporation 2017-01-23T08:06:07.0293371Z Help : [More Information](<a class="postlink" href="https://go.microsoft.com/fwlink/?LinkId=624539">https://go.microsoft.com/fwlink/?LinkId=624539</a>) 2017-01-23T08:06:07.0293371Z ============================================================================== 2017-01-23T08:06:07.0603836Z Preparing task execution handler. 2017-01-23T08:06:07.8572704Z Executing the powershell script: C:\agent_work_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\1.0.84\VSTest.ps1 2017-01-23T08:06:09.2166613Z Working folder: C:\agent_work\1\s 2017-01-23T08:06:09.2166613Z Executing C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe "C:\agent_work\1\s\LignaSystems.PM\test\Tests\bin\Release\net461\Tests.dll" "C:\agent_work\1\s\LignaSystems.PM\test\Tests\bin\Release\net461\win7-x64\Tests.dll" /logger:trx /TestAdapterPath:"C:\agent_work\1\s\LignaSystems.PM\test\Tests\packages" 2017-01-23T08:06:09.5135524Z Microsoft (R) Test Execution Command Line Tool Version 14.0.25420.1 2017-01-23T08:06:09.5135524Z Copyright (c) Microsoft Corporation. All rights reserved. 2017-01-23T08:06:09.5135524Z 2017-01-23T08:06:09.8416774Z Starting test execution, please wait... 2017-01-23T08:06:11.6542052Z Information: [xUnit.net 00:00:01.2808557] Discovering: Tests 2017-01-23T08:06:11.6542052Z 2017-01-23T08:06:13.9667328Z Information: [xUnit.net 00:00:03.6089250] Discovered: Tests 2017-01-23T08:06:13.9667328Z 2017-01-23T08:06:15.2011263Z Information: [xUnit.net 00:00:04.8332378] Starting: Tests 2017-01-23T08:06:15.2011263Z

2017-01-23T08:10:58.9421026Z Failed Tests.Authorization.Accounts.AccountAppService_Tests.Should_Register 2017-01-23T08:10:58.9421026Z ##[error]Error Message: 2017-01-23T08:10:58.9421026Z ##[error] System.Net.Mail.SmtpException : Failure sending mail. 2017-01-23T08:10:58.9421026Z ##[error]---- System.Net.WebException : Unable to connect to the remote server 2017-01-23T08:10:58.9421026Z ##[error]-------- System.Net.Sockets.SocketException : No connection could be made because the target machine actively refused it 127.0.0.1:25 2017-01-23T08:10:58.9421026Z ##[error]Stack Trace: 2017-01-23T08:10:58.9421026Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-23T08:10:58.9421026Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-23T08:10:58.9421026Z ##[error] at Abp.Net.Mail.Smtp.SmtpEmailSender.<SendEmailAsync>d__3.MoveNext() 2017-01-23T08:10:58.9421026Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-23T08:10:58.9421026Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-23T08:10:58.9421026Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-23T08:10:58.9421026Z ##[error] at Abp.Net.Mail.EmailSenderBase.<SendAsync>d__6.MoveNext() 2017-01-23T08:10:58.9421026Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-23T08:10:58.9421026Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-23T08:10:58.9421026Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at Abp.Net.Mail.EmailSenderBase.<SendAsync>d__4.MoveNext() 2017-01-23T08:10:58.9577164Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at Abp.Net.Mail.EmailSenderBase.<SendAsync>d__2.MoveNext() 2017-01-23T08:10:58.9577164Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at Authorization.Users.UserEmailer.<SendEmailActivationLinkAsync>d__5.MoveNext() in C:\agent_work\1\s\LignaSystems.PM\src\Core\Authorization\Users\UserEmailer.cs:line 88 2017-01-23T08:10:58.9577164Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinally>d__1.MoveNext() 2017-01-23T08:10:58.9577164Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at Authorization.Users.UserRegistrationManager.<RegisterAsync>d__11.MoveNext() in C:\agent_work\1\s\LignaSystems.PM\src\Core\Authorization\Users\UserRegistrationManager.cs:line 85 2017-01-23T08:10:58.9577164Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at Authorization.Accounts.AccountAppService.<Register>d__14.MoveNext() in C:\agent_work\1\s\LignaSystems.PM\src\Application\Authorization\Accounts\AccountAppService.cs:line 69 2017-01-23T08:10:58.9577164Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinallyAndGetResult>d__51.MoveNext() 2017-01-23T08:10:58.9577164Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithFinallyAndGetResult>d__31.MoveNext() 2017-01-23T08:10:58.9577164Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at Tests.Authorization.Accounts.AccountAppService_Tests.<Should_Register>d__4.MoveNext() in C:\agent_work\1\s\LignaSystems.PM\test\Tests\Authorization\Accounts\AccountAppService_Tests.cs:line 55 2017-01-23T08:10:58.9577164Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-23T08:10:58.9577164Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-23T08:10:58.9577164Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-23T08:10:58.9577164Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-23T08:10:58.9577164Z ##[error]----- Inner Stack Trace ----- 2017-01-23T08:10:58.9577164Z ##[error] at System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult result) 2017-01-23T08:10:58.9577164Z ##[error] at System.Net.Mail.SmtpTransport.EndGetConnection(IAsyncResult result) 2017-01-23T08:10:58.9577164Z ##[error] at System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult result) 2017-01-23T08:10:58.9577164Z ##[error]----- Inner Stack Trace ----- 2017-01-23T08:10:58.9577164Z ##[error] at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) 2017-01-23T08:10:58.9577164Z

2017-01-23T08:11:00.1764820Z Information: [xUnit.net 00:04:49.8057195] Finished: Tests 2017-01-23T08:11:00.1764820Z 2017-01-23T08:11:00.4533075Z Passed Tests.Orte.OrteWebAPIClient_Tests.PLZByLandId 2017-01-23T08:11:02.2947203Z Results File: C:\agent_work\1\s\TestResults\chef_SERVER-WEB 2017-01-23 09_06_37.trx 2017-01-23T08:11:02.2947203Z 2017-01-23T08:11:02.2947203Z Total tests: 93. Passed: 91. Failed: 1. Skipped: 1. 2017-01-23T08:11:02.2947203Z ##[error] at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)Test Run Failed. 2017-01-23T08:11:02.2947203Z Test execution time: 4,8668 Minutes 2017-01-23T08:11:02.4822124Z ##[error]System.Exception: VSTest Test Run failed with exit code: 1 2017-01-23T08:11:02.5290753Z Publishing Test Results... 2017-01-23T08:11:04.5896005Z Test results remaining: 93 2017-01-23T08:11:06.8017130Z Published Test Run : <a class="postlink" href="https://web-constructions.visualstudio.com/web-constructions/_TestManagement/Runs#runId=33&_a=runCharts">https://web-constructions.visualstudio. ... =runCharts</a> 2017-01-23T08:11:06.8173459Z ##[error]PowerShell script completed with 1 errors. 2017-01-23T08:11:06.8173459Z ##[section]Finishing: Test Assemblies \release***Tests.dll;-:\obj**

Hi

i have a problem with the Tests.Editions.EditionAppService_Tests.Should_Create_Edition and Tests.Authorization.Accounts.AccountAppService_Tests.Should_Register tests, the Test failed every time.

see attached logfile.

Can you help me please? Thanks

2017-01-20T10:33:03.2857128Z Failed LignaSystems.PM.Tests.Editions.EditionAppService_Tests.Should_Create_Edition 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at Abp.EntityFramework.AbpDbContext.<SaveChangesAsync>d__42.MoveNext() 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at Abp.EntityFramework.Uow.EfUnitOfWork.<SaveChangesInDbContextAsync>d__19.MoveNext() 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at Abp.EntityFramework.Uow.EfUnitOfWork.<SaveChangesAsync>d__12.MoveNext() 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at Abp.EntityFramework.Uow.EfUnitOfWork.<CompleteUowAsync>d__15.MoveNext() 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at Abp.Domain.Uow.UnitOfWorkBase.<CompleteAsync>d__57.MoveNext() 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at Abp.Domain.Uow.UnitOfWorkInterceptor.<>c__DisplayClass5_0.<<PerformAsyncUow>b__0>d.MoveNext() 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinally>d__1.MoveNext() 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithFinally>d__0.MoveNext() 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at LignaSystems.PM.Tests.Editions.EditionAppService_Tests.<Should_Create_Edition>d__3.MoveNext() in C:\agent_work\1\s\LignaSystems.PM\test\LignaSystems.PM.Tests\Editions\EditionAppService_Tests.cs:line 43 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error]----- Inner Stack Trace ----- 2017-01-20T10:33:03.2857128Z ##[error] at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.<UpdateAsync>d__0.MoveNext() 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Data.Entity.Core.Objects.ObjectContext.<ExecuteInTransactionAsync>d__3d1.MoveNext() 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Data.Entity.Core.Objects.ObjectContext.<SaveChangesToStoreAsync>d__39.MoveNext() 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Data.Entity.Core.Objects.ObjectContext.<SaveChangesInternalAsync>d__31.MoveNext() 2017-01-20T10:33:03.2857128Z ##[error]----- Inner Stack Trace ----- 2017-01-20T10:33:03.2857128Z ##[error] at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 2017-01-20T10:33:03.2857128Z ##[error] at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 2017-01-20T10:33:03.2857128Z ##[error] at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 2017-01-20T10:33:03.2857128Z ##[error] at Effort.Internal.Common.DatabaseReflectionHelper.InsertEntity(ITable table, Object entity, Transaction transaction) 2017-01-20T10:33:03.2857128Z ##[error] at Effort.Internal.CommandActions.InsertCommandAction.CreateAndInsertEntity(ITable table, IList1 memberBindings, Transaction transaction) 2017-01-20T10:33:03.2857128Z ##[error] at Effort.Internal.CommandActions.InsertCommandAction.ExecuteDataReader(ActionContext context) 2017-01-20T10:33:03.2857128Z ##[error] at Effort.Provider.EffortEntityCommand.ExecuteDbDataReader(CommandBehavior behavior) 2017-01-20T10:33:03.2857128Z ##[error] at System.Data.Common.DbCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Data.Entity.Core.Mapping.Update.Internal.DynamicUpdateCommand.<ExecuteAsync>d__0.MoveNext() 2017-01-20T10:33:03.2857128Z ##[error]--- End of stack trace from previous location where exception was thrown --- 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 2017-01-20T10:33:03.2857128Z ##[error] at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.<UpdateAsync>d__0.MoveNext() 2017-01-20T10:33:03.2857128Z ##[error]----- Inner Stack Trace ----- 2017-01-20T10:33:03.2857128Z ##[error] at NMemory.Tables.Relation4.ValidateEntityCore(TForeign foreign) 2017-01-20T10:33:03.2857128Z ##[error] at NMemory.Tables.Relation4.NMemory.Tables.IRelationInternal.ValidateEntity(Object foreign) 2017-01-20T10:33:03.2857128Z ##[error] at NMemory.Execution.ExecutionHelper.ValidateForeignKeys(IList1 relations, IEnumerable1 referringEntities) 2017-01-20T10:33:03.2857128Z ##[error] at NMemory.Execution.CommandExecutor.ExecuteInsert[T](T entity, IExecutionContext context) 2017-01-20T10:33:03.2857128Z ##[error] at NMemory.Tables.DefaultTable2.InsertCore(TEntity entity, Transaction transaction) 2017-01-20T10:33:03.2857128Z ##[error] at Effort.Internal.DbManagement.Engine.ExtendedTable2.InsertCore(TEntity entity, Transaction transaction) 2017-01-20T10:33:03.2857128Z ##[error] at NMemory.Tables.Table`2.Insert(TEntity entity, Transaction transaction)

...........

2017-01-20T10:36:26.3962756Z Failed LignaSystems.PM.Tests.Authorization.Accounts.AccountAppService_Tests.Should_Register 2017-01-20T10:36:26.3962756Z

Hi

my code looks like this:

    public async Task&lt;AjaxResponse&lt;List&lt;int&gt;>> GetListOfInts()
    {
        AjaxResponse&lt;List&lt;int&gt;> listOfInts = new AjaxResponse&lt;List&lt;int&gt;>();

        string path = $"/api/services/app/Orte/GetPLZByLandId?land={land}";
        HttpResponseMessage response = await GetAsync(path);

        var r = await response.Content.ReadAsStringAsync();
        if (response.IsSuccessStatusCode)
            listOfInts = await response.Content.ReadAsAsync&lt;AjaxResponse&lt;List&lt;int&gt;>>();
        else
            listOfInts = await response.Content.ReadAsAsync&lt;AjaxResponse&lt;List&lt;int&gt;>>();

        return listOfInts;
    }

My Json Result looks like this: {"result":{"items":[1000,1020,1030,1040,1050,9992]},"targetUrl":null,"success":true,"error":null,"unAuthorizedRequest":false,"__abp":true}

On Error the Json looks like this: {"result":null,"targetUrl":null,"success":false,"error":{"code":0,"message":"[Invalid country]","details":null,"validationErrors":null},"unAuthorizedRequest":false,"__abp":true}

But the conversion of the to case doesnt work.

Hi

i have create a class for the response, but how i can desirialized the json to this c# class?

{"result":{"isValid":true,"value":0.87},"targetUrl":null,"success":true,"error":null,"unAuthorizedRequest":false,"__abp":true}

This doesnt work MyClass obj = new MyClass(); HttpResponseMessage response = await GetAsync(path); if (response.IsSuccessStatusCode) obj = await response.Content.ReadAsAsync<MyClass>();

Hello

how can i desirialized the following Json Result comming from AppService (inherit from AbpServiceBase) to my c# object ? {"result":{"isValid":true,"value":0.87},"targetUrl":null,"success":true,"error":null,"unAuthorizedRequest":false,"__abp":true}

The problem is that the property in the result has no name {"isValid":true,"value":0.87}

I m using the function esponse.Content.ReadAsAsync<T>

For Json result of where the result is a list of items, it s work because the list of item is in the Json result is in the following format and has a "items" property. {"result":{"items":[1000,1020,1853,186091,9992]},"targetUrl":null,"success":true,"error":null,"unAuthorizedRequest":false,"__abp":true}

How can i desirialized a result of single object in my c# object ?

Thanks

Hi

ok, thanks for give me update.

Hi

and when i call a api get function wich doesnt need authentification token, the function parameters are also not passed.. I think the problem is not the authentication?

Hi

I m using .Net Core Angular2 version. Swagger GET not passing parameters to API function.

example: <a class="postlink" href="http://localhost:22742/swagger/ui/index.html#!/AuditLog/ApiServicesAppAuditLogGetAuditLogsGet">http://localhost:22742/swagger/ui/index ... ditLogsGet</a> In the GET /api/services/app/AuditLog/GetAuditLogs swagger does not pass parameters to the API function.

Thanks for help

Hm.. i cannot found it in the .net core version of the aspzero.net template... :(

Showing 31 to 40 of 41 entries