Base solution for your next web application

Activities of "alfar_re"

Answer

Hi @ismcagdas,

Did you receive the email? It's a bit urgent since we are not able to test out.

Answer

Hi @ismcagdas,

I've sent the email with the subject the same as this issue.

Answer

Hi,

Yes I did. I implemented all these changes. I also hosted on Azure and set to HTTPs only but the same problem persists.

Answer

Hi @ismcagdas,

I implemented as on the Zero example but the problem persists. I hosted the app on Azure.

For tenant login I get redirected to the link below;

/Account/Login?ReturnUrl=/App

On tenant login second attempt while the link is as above I get redirected to the App/Welcome page with no menu.

For host login I ger redirected to the welcome page: /App/Welcome

What might be the issue here. And funny enough, on localhost, the app only works well on Firefox. The other browsers will either have same issue as above or login and give the error User did not login to the application

Yes. I also cleaned the project, deleted all app files on the app service and re-uploaded.

Hi @ismcagdas

I deleted it and created a new one and run migrations. Removed some config files at the root of the app and restarted the app. I also added the connection string to the application settings and it worked.

Hi @ismcagdas,

I only have this in my appsettings file

"KestrelServer": {
    "IsEnabled": true
  }
  

Here is the stack trace from Azure. The id is also auto-increament. The below trace is from the Debug Console.

 Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'value')
   at System.Boolean.Parse(String value)
   at lipasasa.Web.Startup.Startup.ConfigureServices(IServiceCollection services) in ****.Web.Mvc\Startup\Startup.cs:line 72
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
   at Microsoft.AspNetCore.Hosting.StartupLoader.ConfigureServicesDelegateBuilder`1.<>c__DisplayClass15_0.<BuildStartupServicesFilterPipeline>g__RunPipeline|0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.StartupLoader.ConfigureServicesDelegateBuilder`1.&lt;&gt;c__DisplayClass14_0.&lt;ConfigureServices&gt;g__ConfigureServicesWithContainerConfiguration|0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.WebHost.EnsureApplicationServices()
   at Microsoft.AspNetCore.Hosting.WebHost.Initialize()
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
   at lipasasa.Web.Startup.Program.Main(String[] args) in ***.Web.Mvc\Startup\Program.cs:line 12
   

This is from the azure app insights error 500 trace

Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'Id', table 'lipasasav1Db.dbo.AbpAuditLogs'; column does not allow nulls. INSERT fails.
The statement has been terminated.
   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()
   at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at Microsoft.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean isInternal, Boolean forDescribeParameterEncryption)
   at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult asyncResult, Boolean isInternal, String endMethod)
   at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderInternal(IAsyncResult asyncResult)
   at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderAsync(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
ClientConnectionId:0b05f022-22b7-4c50-a945-7e536764864b
Error Number:515,State:2,Class:16
ClientConnectionId before routing:4fc32061-6cb8-431a-8869-029aca81b773
Routing Destination:c1fd9552a407.tr18.northcentralus1-a.worker.database.windows.net,11064

Hi @ismcagdas,

Now it is on line 72 which is below.

if (bool.Parse(_appConfiguration["KestrelServer:IsEnabled"])) { ConfigureKestrel(services); }

Another thing I noted is that on the Azure Application Insights I get the following error;

Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'Id', table 'lipasasav1Db.dbo.AbpAuditLogs'; column does not allow nulls. INSERT fails. The statement has been terminated.

Hi @ismcagdas,

Apologies I'd lost track on this. Yes I did, it worked perfectly.

Hello @musa.demir,

It seems there is a problem with some browsers. I tried a different browser and got a different error. The error was based on the user not having sufficient rights. How do I make the new user the admin with all available rights?

Showing 11 to 20 of 101 entries