Asp user secret issue when publishing project

<configuration>
    <connectionStrings>
        <add name="Model1" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=DatabaseName;Integrated Security=True; MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
    </connectionStrings>
</configuration>

I am receiving an ArgumentNullException when I attempt to publish and upload my application to the server. The connection string inside user secret is not causing any issues when running locally, but I am getting the following error message:

Value cannot be null. (Parameter 'connectionString')

The connection string inside my configuration is as follows:

<configuration>
    <connectionStrings>
        <add name="Model1" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=DatabaseName;Integrated Security=True; MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
    </connectionStrings>
</configuration>

The issue is that the connectionString parameter in the add element of the connectionStrings section in the configuration file is null. To fix this, make sure that the connectionString parameter contains a valid connection string.