Base solution for your next web application

Activities of "alfar_re"

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.

  • Version 9.1
  • MVC
  • .NET Core

I'm having issues publishing an app built on the above to Azure app service with all settings correct. Below is the error am getting via the Kudu Diagnostics Console since that is the only way am able to get to the app after hosting.

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 ...Mvc\Startup\Startup.cs:line 80 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.ConfigureServicesDelegateBuilder1.<>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.ConfigureServicesDelegateBuilder1.<>c__DisplayClass14_0.<ConfigureServices>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

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?

Hi @ismcagdas,

Yes it did. Only one problem remaining. When a new tenant registers, the registration goes through well but on login, they get the error;

Current user did not login to the application

Hi @zony,

Great. Let me try that.

Hi @zony,

I see.

I'm thinking I can autogenerate my tenancy names then collect a mobile number from the user and use the mobile number as the username. My goal is to have users login using their mobile numbers. Would that work?

Hi @ismcagdas,

Can I get a resolution for this? It has been many days.

Showing 21 to 30 of 138 entries