IsNemoEqualTrue/monitor-table-change-with-sqltabledependency

Not working in dot net core 3.1 IIS production Environment

Closed this issue · 4 comments

https://gyazo.com/139d80f1da70df3d47d2784c5c5d9916
https://gyazo.com/a01408fac552ee5d38afcba0cbda8878
https://gyazo.com/39f039164d127a4606fdab1b31c8139d
https://gyazo.com/533a734217d2c2cd3ef658dc0f37e611
https://gyazo.com/4f57cbb524c8a9c7fa4493f157c0f677

Thows this Error:
Category: Microsoft.AspNetCore.Hosting.Diagnostics
EventId: 6

Application startup exception

Exception:
TableDependency.SqlClient.Exceptions.ImpossibleOpenSqlConnectionException: Impossible open db connection using the following connection string 'Data Source=localhost;Initial Catalog=BDO_PROVISIONES-VIDA;Integrated Security=True;MultipleActiveResultSets=True;Connect Timeout=30'.
---> System.Data.SqlClient.SqlException (0x80131904): Error de inicio de sesión del usuario 'GRCLAN\GRCSERVER1$'.
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken)
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, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry) at System.Data.SqlClient.SqlConnection.Open() at TableDependency.SqlClient.SqlTableDependency1.CheckIfConnectionStringIsValid()
ClientConnectionId:78708c0d-a4ff-44e0-99f5-1f8f52d5fb25
Error Number:18456,State:1,Class:14
--- End of inner exception stack trace ---
at TableDependency.SqlClient.SqlTableDependency1.CheckIfConnectionStringIsValid() at TableDependency.SqlClient.Base.TableDependency1..ctor(String connectionString, String tableName, String schemaName, IModelToTableMapper1 mapper, IUpdateOfModel1 updateOf, ITableDependencyFilter filter, DmlTriggerType dmlTriggerType, Boolean executeUserPermissionCheck)
at TableDependency.SqlClient.SqlTableDependency1..ctor(String connectionString, String tableName, String schemaName, IModelToTableMapper1 mapper, IUpdateOfModel`1 updateOf, ITableDependencyFilter filter, DmlTriggerType notifyOn, Boolean executeUserPermissionCheck, Boolean includeOldValues)
at Hubs.Subscriptions.TempDdbbDatabaseSubscription.Configure(String connectionString) in C:\bdo\provisiones-vida\provisiones-vida-be\ProvisionesVidaBE\Hubs\Subscriptions\TempDdbbDatabaseSubscription.cs:line 26
at Hubs.Extensions.ApplicationBuilderExtensions.UseSqlTableDependency[T](IApplicationBuilder services, String connectionString) in C:\bdo\provisiones-vida\provisiones-vida-be\ProvisionesVidaBE\Hubs\Extensions\ApplicationBuilderExtensions.cs:line 16
at API.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env) in C:\bdo\provisiones-vida\provisiones-vida-be\ProvisionesVidaBE\API\Startup.cs:line 291
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.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.b__0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass13_0.b__2(IApplicationBuilder app)
at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Server.IIS.Core.IISServerSetupFilter.<>c__DisplayClass2_0.b__0(IApplicationBuilder app)
at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.b__0(IApplicationBuilder app)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)

And throws this error IIS Debug atach
https://gyazo.com/4d72f286ffad6c252a1405cea5d7a315

I do not maintain any more this Repository.

Solved adding dbowner to the user of SQL Server.
Thanks anyway

Hi @ericmoros, could you please close this issue?

Thank you