Base solution for your next web application
Open Closed

Setup Page workflow #4405


User avatar
0
TomLeonard created

Hello

Could you specify Setup Page usage scenario? I have downloaded clean app (core + angular).

  • Is it correct I can go to app/admin/install and setup database from here? I'm not able to open this page because of error on GetCurrentLoginInformations api call
Cannot open database "..." requested by the login. The login failed.
  • Deployed app has enabled anonymous api/services/app/Install/GetAppSettingsJson Is it by design or it should be disabled after deploy?

Thanks


11 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    hi,

    1- Clean your website cookies and try again. The exception says, you have a authentication cookie that's why it's trying to login website without a database. <a class="postlink" href="https://aspnetzero.com/Documents/Development-Guide-Angular#setup-page">https://aspnetzero.com/Documents/Develo ... setup-page</a>

    2-This is an issue that's being fixed currently. Team is resolving the issue.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Related github issue <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/698">https://github.com/aspnetzero/aspnet-ze ... issues/698</a>

  • User Avatar
    0
    TomLeonard created

    I think I have cleared cookies. Also I have just started 5.0.6 client and api without database to test setup process on new server.

    So <a class="postlink" href="http://localhost:4200">http://localhost:4200</a> results in 500 Internal Server Error for AbpUserConfiguration/GetAll <a class="postlink" href="http://localhost:4200/app/admin/install">http://localhost:4200/app/admin/install</a> results in 500 Internal Server Error for Session/GetCurrentLoginInformations

    Could you specify do I miss some steps?

  • User Avatar
    0
    aaron created
    Support Team

    Can you show the error in Logs.txt?

  • User Avatar
    0
    TomLeonard created

    of course, it is sql connection error (there is no database as I want to setup it)

    INFO  2017-12-28 20:19:57,644 [4    ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 OPTIONS http://localhost:22742/api/services/app/Session/GetCurrentLoginInformations  
    INFO  2017-12-28 20:19:57,648 [4    ] pNetCore.Cors.Infrastructure.CorsService - Policy execution successful.
    INFO  2017-12-28 20:19:57,652 [4    ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 7.0793ms 204 
    INFO  2017-12-28 20:19:57,664 [9    ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET http://localhost:22742/api/services/app/Session/GetCurrentLoginInformations application/json 
    INFO  2017-12-28 20:19:57,666 [9    ] pNetCore.Cors.Infrastructure.CorsService - Policy execution successful.
    INFO  2017-12-28 20:19:57,926 [9    ] pNetCore.Cors.Infrastructure.CorsService - Policy execution successful.
    INFO  2017-12-28 20:19:59,729 [9    ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method Vypin.Sessions.SessionAppService.GetCurrentLoginInformations (Vypin.Application) with arguments ((null)) - ModelState is Valid
    ERROR 2017-12-28 20:20:09,855 [9    ] Mvc.ExceptionHandling.AbpExceptionFilter - Cannot open database "SomeDb" requested by the login. The login failed.
    Login failed for user 'MicrosoftAccount\[email protected]'.
    System.Data.SqlClient.SqlException (0x80131904): Cannot open database "SomeDb" requested by the login. The login failed.
    Login failed for user 'MicrosoftAccount\[email protected]'.
       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling)
       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
       at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
       at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.Open()
       at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected)
       at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction(IsolationLevel isolationLevel)
       at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.&lt;&gt;c__DisplayClass18_0.&lt;BeginTransaction&gt;b__0(DatabaseFacade database)
       at Microsoft.EntityFrameworkCore.ExecutionStrategyExtensions.&lt;&gt;c__DisplayClass12_0`2.<Execute>b__0(DbContext c, TState s)
       at Microsoft.EntityFrameworkCore.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
       at Microsoft.EntityFrameworkCore.ExecutionStrategyExtensions.Execute[TState,TResult](IExecutionStrategy strategy, Func`2 operation, Func`2 verifySucceeded, TState state)
       at Microsoft.EntityFrameworkCore.ExecutionStrategyExtensions.Execute[TState,TResult](IExecutionStrategy strategy, TState state, Func`2 operation)
       at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.BeginTransaction(DatabaseFacade databaseFacade, IsolationLevel isolationLevel)
       at Abp.EntityFrameworkCore.Uow.DbContextEfCoreTransactionStrategy.CreateDbContext[TDbContext](String connectionString, IDbContextResolver dbContextResolver) in D:\Github\aspnetboilerplate\src\Abp.EntityFrameworkCore\EntityFrameworkCore\Uow\DbContextEfCoreTransactionStrategy.cs:line 38
       at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.GetOrCreateDbContext[TDbContext](Nullable`1 multiTenancySide) in D:\Github\aspnetboilerplate\src\Abp.EntityFrameworkCore\EntityFrameworkCore\Uow\EfCoreUnitOfWork.cs:line 116
       at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.get_Table() in D:\Github\aspnetboilerplate\src\Abp.EntityFrameworkCore\EntityFrameworkCore\Repositories\EfCoreRepositoryBaseOfTEntityAndTPrimaryKey.cs:line 39
       at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.GetAllIncluding(Expression`1[] propertySelectors) in D:\Github\aspnetboilerplate\src\Abp.EntityFrameworkCore\EntityFrameworkCore\Repositories\EfCoreRepositoryBaseOfTEntityAndTPrimaryKey.cs:line 88
       at Castle.Proxies.Invocations.IRepository`2_GetAll.InvokeMethodOnTarget()
       at Castle.DynamicProxy.AbstractInvocation.Proceed()
       at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) in D:\Github\aspnetboilerplate\src\Abp\Domain\Uow\UnitOfWorkInterceptor.cs:line 68
       at Castle.DynamicProxy.AbstractInvocation.Proceed()
       at Castle.Proxies.IRepository`1Proxy.GetAll()
       at Castle.Proxies.Invocations.AbpTenantManager`2_get_Tenants.InvokeMethodOnTarget()
       at Castle.DynamicProxy.AbstractInvocation.Proceed()
       at Castle.DynamicProxy.AbstractInvocation.Proceed()
       at Castle.Proxies.TenantManagerProxy.get_Tenants()
       at Vypin.Sessions.SessionAppService.<GetCurrentLoginInformations>d__0.MoveNext() in C:\proj\vypin\temp\5_0_6\Vypin\src\Vypin.Application\Sessions\SessionAppService.cs:line 35
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at lambda_method(Closure , Object )
       at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__14.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextExceptionFilterAsync>d__23.MoveNext()
    ClientConnectionId:b34f7e4e-9eb8-498b-ad30-b6deeaea5e36
    Error Number:4060,State:1,Class:11
    

    thanks!

  • User Avatar
    0
    alper created
    Support Team

    there's something weird in the console log. I calls

    api/services/app/Session/GetCurrentLoginInformations
    

    It should be called only when there's a authenication cookie. Can I see the request parameters of GetCurrentLoginInformations action

  • User Avatar
    0
    TomLeonard created

    there is no authentication data.

    This is just clean 5.0.6 installation. I can try with another pc also.

  • User Avatar
    0
    ismcagdas created
    Support Team

    @TomLeonard,

    I assume you still have cookies on your browser. Can you check Applicataion tab on Google Chrome's developer console ?

    GetCurrentLoginInformations shouldn't be called if there were no cookies. But, there might be a bug as well.

  • User Avatar
    0
    TomLeonard created

    hello

    there are no cookies. also I have checked clean 5.0.6 on another PC. The result is the same - GetCurrentLoginInformations error. most probably there is a bug.

    thanks!

  • User Avatar
    0
    TomLeonard created

    Actually I was able to open this page on IE. But I'm sure I have cleaned the cookies on Chrome and get the problem. So thanks, looks like the feature is working,

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks for the feedback :)