【问题标题】:My connection string is not working for signalR我的连接字符串不适用于 signalR
【发布时间】:2017-05-03 18:43:22
【问题描述】:

我的实体有名称crowdfundingEnities4 和userdataEntities6。但我希望crowdfundingEntities4 用于通知。

我创建了一个名为 sqlConString 的新 sqlConnectionString。

我在 Global.aspx 中的代码如下

公共类 MvcApplication : System.Web.HttpApplication { 字符串 con = ConfigurationManager.ConnectionStrings["crowdfundingEntities4"].ConnectionString; 受保护的无效 Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); SqlDependency.Start(con); }

但它在 SqlDepedency.Start(con) 行上显示不同的错误

【问题讨论】:

    标签: asp.net-mvc entity-framework visual-studio-2012


    【解决方案1】:

    您确定您的数据库服务器已配置,服务代理已启用并且您的用户拥有所需的所有权限吗? 为了使用 SqlDependency,它需要 Service Broker。所以你必须在数据库上启用 Service Broker 并检查所需的最低数据库权限

    https://www.codeproject.com/Articles/12862/Minimum-Database-Permissions-Required-for-SqlDepen

    【讨论】:

      猜你喜欢
      • 2017-10-15
      • 2018-02-20
      • 1970-01-01
      • 2016-09-06
      • 1970-01-01
      • 2015-11-23
      • 2020-01-11
      • 2019-05-22
      • 1970-01-01
      相关资源
      最近更新 更多