我正在尝试开发一个使用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);
有人可以帮我看看这个问题?
谢谢!数据库管理员授予我的用户作为公共用户,所以我没有权限更改数据库或用户。没有任何东西。我尝试创建其他用户,然后使用该用户运行命令。幸运的是,它成功了,现在我可以使用信号。也许我再次使用这个托管服务提供商! –