我正在嘗試開發一個使用Signalr和SqlDependency
的網站。我已經啓用Service Broker的跑瞭如下的T SQL:SqlDependency.Start()錯誤:「無法找到指定用戶的所有者」
GRANT CREATE PROCEDURE TO [SqlUser];
GRANT CREATE SERVICE TO [SqlUser];
GRANT CREATE QUEUE TO [SqlUser];
GRANT REFERENCES ON CONTRACT::[http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification] TO [SqlUser];
GRANT SUBSCRIBE QUERY NOTIFICATIONS TO [SqlUser];
GRANT CONTROL ON SCHEMA::[dbo] TO [SqlUser];
GRANT IMPERSONATE ON USER::DBO TO [SqlUser];
但是當我運行的網站,我收到以下錯誤:
Cannot find the specified user 'owner'.
Cannot find the queue 'SqlQueryNotificationService-ce08361b-7c12-412a-a087-495959118214', because it does not exist or you do not have permission.
Invalid object name 'SqlQueryNotificationService-ce08361b-7c12-412a-a087-495959118214'.
protected void Application_Start()
{
SqlDependency.Start(
ConfigurationManager
.ConnectionStrings["CiaosConnectionString"].ConnectionString);
//WebApiConfig.Register(GlobalConfiguration.Configuration);
GlobalConfiguration.Configure(WebApiConfig.Register);
有人可以幫我看看這個問題?
謝謝!數據庫管理員授予我的用戶作爲公共用戶,所以我沒有權限更改數據庫或用戶。沒有任何東西。我嘗試創建其他用戶,然後使用該用戶運行命令。幸運的是,它成功了,現在我可以使用信號。也許我再次使用這個託管服務提供商! –