我正在尝试SqlDependency
进行我的申请。在Application_Start()
方法的 global.asax 中,我正在编写以下代码:
string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["GmgHosEntities"].ConnectionString;'
System.Data.SqlClient.SqlDependency.Start(connectionString);
和
connectionString = "metadata=res://*/GmgHosModel.csdl|res://*/GmgHosModel.ssdl|res://*/GmgHosModel.msl;provider=System.Data.SqlClient;provider connection string=\"Data Source=HYTDEVSQL.gentest.hqtest.local;Persist Security Info=True;Initial Catalog=HAYAT;User ID=***;Password=***;MultipleActiveResultSets=True;Connection Timeout=180;application name=EntityFramework\""
给。但在这种情况下;
System.Data.SqlClient.SqlDependency.Start(connectionString);
我收到此错误:
Additional information: Keyword not supported: metadata.
我的web.config文件中的连接字符串
我该如何解决?