Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mattia 6 posts 77 karma points
    Jun 20, 2017 @ 12:08
    Mattia
    0

    DB Connection: Parameter name: sqlSyntax

    Hi!

    My connection string is not working properly:

    <add name="umbracoDbDSN" connectionString="Provider=SqlOLEDB;Data Source=hostingmssql03;Initial Catalog=hypnoise_simply__winspace_it_hypnoise;User Id=hypnoise_simply__winspace_it_filippo;Password=******;" />

    I cannot figure out what is the problem. The Umbraco message when i try to reach the back-end (either the front-end) is the following:

    "Value cannot be null. Parameter name: sqlSyntax Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: sqlSyntax"

    In localhost i use

    <add name="umbracoDbDSN" connectionString="Server=127.0.0.1\SQLEXPRESS;Database=Hypnoise;Integrated Security=true" providerName="System.Data.SqlClient" />
    

    and everything works fine! But the provider told me to use the other connection string....

    In the log file i found:

    2017-06-20 13:55:12,914 [P1348/D2/T8] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
    System.ArgumentNullException: Value cannot be null.
    Parameter name: sqlSyntax
    at Umbraco.Core.Persistence.Repositories.PetaPocoRepositoryBase`2..ctor(IDatabaseUnitOfWork work, CacheHelper cache, ILogger logger, ISqlSyntaxProvider sqlSyntax)
    at Umbraco.Core.Persistence.RepositoryFactory.CreateDomainRepository(IDatabaseUnitOfWork uow)
    at Umbraco.Core.Services.DomainService.GetAll(Boolean includeWildcards)
    at Umbraco.Web.Routing.PublishedContentRequestEngine.FindDomain()
    at Umbraco.Web.Routing.PublishedContentRequestEngine.PrepareRequest()
    at Umbraco.Web.UmbracoModule.ProcessRequest(HttpContextBase httpContext)
    at Umbraco.Web.UmbracoModule.<Init>b__8(Object sender, EventArgs e)
    at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    2017-06-20 13:55:12,980 [P1348/D2/T8] ERROR umbraco.DataLayer.SqlHelper`1[[System.Data.SqlClient.SqlParameter, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] - Error executing query SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = @tableName
    System.ArgumentException: Keyword not supported: 'provider'.
    at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
    at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
    at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
    at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
    at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
    at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString, SqlCredential credential)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
    at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
    at umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteScalar(String commandText, SqlParameter[] parameters)
    at umbraco.DataLayer.SqlHelper`1.ExecuteScalar[T](String commandText, IParameter[] parameters)
    2017-06-20 13:55:13,281 [P1348/D2/T8] ERROR umbraco.DataLayer.SqlHelper`1[[System.Data.SqlClient.SqlParameter, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] - Error executing query SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = @tableName
    System.ArgumentException: Keyword not supported: 'provider'.
    at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
    at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
    at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
    at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
    at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
    at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString, SqlCredential credential)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
    at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
    at umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteScalar(String commandText, SqlParameter[] parameters)
    at umbraco.DataLayer.SqlHelper`1.ExecuteScalar[T](String commandText, IParameter[] parameters)
    2017-06-20 13:55:13,281 [P1348/D2/T8] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
    umbraco.DataLayer.SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteScalar ---> System.ArgumentException: Keyword not supported: 'provider'.
    at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
    at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
    at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
    at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
    at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
    at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString, SqlCredential credential)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
    at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
    at umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteScalar(String commandText, SqlParameter[] parameters)
    at umbraco.DataLayer.SqlHelper`1.ExecuteScalar[T](String commandText, IParameter[] parameters)
    --- End of inner exception stack trace ---
    at umbraco.DataLayer.SqlHelper`1.ExecuteScalar[T](String commandText, IParameter[] parameters)
    at InfoCaster.Umbraco.UrlTracker.Repositories.UrlTrackerRepository.GetUrlTrackerTableExists() in D:\kipusoep\Documents\GitHub\UrlTracker\Repositories\UrlTrackerRepository.cs:line 434
    at InfoCaster.Umbraco.UrlTracker.Modules.UrlTrackerModule.CheckUrlTrackerInstalled() in D:\kipusoep\Documents\GitHub\UrlTracker\Modules\UrlTrackerModule.cs:line 66
    at InfoCaster.Umbraco.UrlTracker.Modules.UrlTrackerModule.Context_PostResolveRequestCache(Object sender, EventArgs e) in D:\kipusoep\Documents\GitHub\UrlTracker\Modules\UrlTrackerModule.cs:line 47
    at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    2017-06-20 13:55:13,343 [P1348/D2/T8] ERROR umbraco.DataLayer.SqlHelper`1[[System.Data.SqlClient.SqlParameter, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] - Error executing query SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = @tableName
    System.ArgumentException: Keyword not supported: 'provider'.
    at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
    at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
    at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
    at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
    at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
    at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString, SqlCredential credential)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
    at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
    at umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteScalar(String commandText, SqlParameter[] parameters)
    at umbraco.DataLayer.SqlHelper`1.ExecuteScalar[T](String commandText, IParameter[] parameters)
    2017-06-20 14:05:52,425 [P1348/D2/T15] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
    System.ArgumentNullException: Value cannot be null.
    Parameter name: sqlSyntax
    at Umbraco.Core.Persistence.Repositories.PetaPocoRepositoryBase`2..ctor(IDatabaseUnitOfWork work, CacheHelper cache, ILogger logger, ISqlSyntaxProvider sqlSyntax)
    at Umbraco.Core.Persistence.RepositoryFactory.CreateDomainRepository(IDatabaseUnitOfWork uow)
    at Umbraco.Core.Services.DomainService.GetAll(Boolean includeWildcards)
    at Umbraco.Web.Routing.PublishedContentRequestEngine.FindDomain()
    at Umbraco.Web.Routing.PublishedContentRequestEngine.PrepareRequest()
    at Umbraco.Web.UmbracoModule.ProcessRequest(HttpContextBase httpContext)
    at Umbraco.Web.UmbracoModule.<Init>b__8(Object sender, EventArgs e)
    at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    2017-06-20 14:05:52,436 [P1348/D2/T15] ERROR umbraco.DataLayer.SqlHelper`1[[System.Data.SqlClient.SqlParameter, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] - Error executing query SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = @tableName
    System.ArgumentException: Keyword not supported: 'provider'.
    at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
    at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
    at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
    at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
    at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
    at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString, SqlCredential credential)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
    at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
    at umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteScalar(String commandText, SqlParameter[] parameters)
    at umbraco.DataLayer.SqlHelper`1.ExecuteScalar[T](String commandText, IParameter[] parameters)
    2017-06-20 14:05:52,589 [P1348/D2/T19] ERROR umbraco.DataLayer.SqlHelper`1[[System.Data.SqlClient.SqlParameter, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] - Error executing query SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = @tableName
    System.ArgumentException: Keyword not supported: 'provider'.
    at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
    at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
    at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
    at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
    at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
    at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString, SqlCredential credential)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
    at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
    at umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteScalar(String commandText, SqlParameter[] parameters)
    at umbraco.DataLayer.SqlHelper`1.ExecuteScalar[T](String commandText, IParameter[] parameters)
    2017-06-20 14:05:52,589 [P1348/D2/T19] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
    umbraco.DataLayer.SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteScalar ---> System.ArgumentException: Keyword not supported: 'provider'.
    at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
    at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
    at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
    at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
    at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
    at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString, SqlCredential credential)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
    at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
    at umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteScalar(String commandText, SqlParameter[] parameters)
    at umbraco.DataLayer.SqlHelper`1.ExecuteScalar[T](String commandText, IParameter[] parameters)
    --- End of inner exception stack trace ---
    at umbraco.DataLayer.SqlHelper`1.ExecuteScalar[T](String commandText, IParameter[] parameters)
    at InfoCaster.Umbraco.UrlTracker.Repositories.UrlTrackerRepository.GetUrlTrackerTableExists() in D:\kipusoep\Documents\GitHub\UrlTracker\Repositories\UrlTrackerRepository.cs:line 434
    at InfoCaster.Umbraco.UrlTracker.Modules.UrlTrackerModule.CheckUrlTrackerInstalled() in D:\kipusoep\Documents\GitHub\UrlTracker\Modules\UrlTrackerModule.cs:line 66
    at InfoCaster.Umbraco.UrlTracker.Modules.UrlTrackerModule.Context_PostResolveRequestCache(Object sender, EventArgs e) in D:\kipusoep\Documents\GitHub\UrlTracker\Modules\UrlTrackerModule.cs:line 47
    at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    2017-06-20 14:05:52,593 [P1348/D2/T19] ERROR umbraco.DataLayer.SqlHelper`1[[System.Data.SqlClient.SqlParameter, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] - Error executing query SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = @tableName
    System.ArgumentException: Keyword not supported: 'provider'.
    at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
    at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
    at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
    at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
    at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
    at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString, SqlCredential credential)
    at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
    at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
    at umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteScalar(String commandText, SqlParameter[] parameters)
    at umbraco.DataLayer.SqlHelper`1.ExecuteScalar[T](String commandText, IParameter[] parameters)
    
  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    Jun 20, 2017 @ 14:36
    Michael Latouche
    0

    Hi Mattia,

    The inner exceptions contain the message "Keyword not supported: 'provider'", so I guess the format of your connection string is not recognized by Umbraco.

    Did you try to keep the same syntax as in your local settings by just replacing the server name, database names etc.?

    Cheers,

    Michael.

  • Mattia 6 posts 77 karma points
    Jun 20, 2017 @ 14:53
    Mattia
    0

    Yes but i cannot seem to find the right providerName="System.Data.SqlClient"

  • Mattia 6 posts 77 karma points
    Jun 21, 2017 @ 12:13
    Mattia
    0

    Anyone?

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    Jun 21, 2017 @ 12:59
    Michael Latouche
    0

    Hi Mattia,

    What do you mean? Do you get an error on the providerName?

    Did you checked this thread : https://our.umbraco.org/forum/ourumb-dev-forum/bugs/75470-new-install-help-value-cannot-be-null-parameter-name-sqlsyntax

    Apparently you can see the actual SQl error in your App_Data log file.

    Or you might also find some info here (things to check) : https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/74691-umbraco-install-736-install-failed

    Hope this helps...

    Cheers,

    Michaƫl.

Please Sign in or register to post replies

Write your reply to:

Draft