Asked by:
Additional information: User without permissions.

Question
-
User932259438 posted
private StockTicker(IHubConnectionContext<dynamic> clients) { Clients = clients; //Posts var mapper = new ModelToTableMapper<Posts>(); mapper.AddMapping(s => s.ID, "ID"); _tableDependency = new SqlTableDependency<Posts>( ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString, "tbl_Posts", mapper); _tableDependency.OnChanged += SqlTableDependency_Changed; _tableDependency.OnError += SqlTableDependency_OnError; _tableDependency.Start(); }
Why I got this error? Additional information: User without permissions.
Friday, January 12, 2018 4:21 PM
All replies
-
User-359936451 posted
Its good chance that you have a permission issue on your SQL database. check the permissions settings.
It would help if you posted the full error on here as well.
Friday, January 12, 2018 4:53 PM -
User932259438 posted
An exception of type 'TableDependency.SqlClient.Exceptions.UserWithNoPermissionException' occurred in mscorlib.dll but was not handled in user code
Additional information: User without permissions.
Friday, January 12, 2018 7:58 PM -
User1400794712 posted
Hi progy85,
According to the error message, SqlTableDependency doesn't have permission with SQL Sever. I checked the official document, please make sure to GRANT the following permissions:
- ALTER
- CONNECT
- CONTROL
- CREATE CONTRACT
- CREATE MESSAGE TYPE
- CREATE PROCEDURE
- CREATE QUEUE
- CREATE SERVICE
- EXECUTE
- SELECT
- SUBSCRIBE QUERY NOTIFICATIONS
- VIEW DATABASE STATE
- VIEW DEFINITION
If you can't get enough permissions, you can chooes to skip the permissions test done by SqlTableDependency, otherwise an SQL server exception will be thrown. —— Set the executeUserPermissionCheck constructor parameter to false.
Besides, if you still have problems, you can also refer to the github link, it's the official tutorial.
Best Regards,
Daisy
Monday, January 15, 2018 6:23 AM -
User1629609399 posted
Remember to
ALTER DATABASE ACME SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE;
and then check your connection
connectionString="Server=xxxL; Initial Catalog=ACME;Integrated Security=false;User ID=sa;Password=yourPassword;
Thursday, April 12, 2018 10:40 PM