C# 通过类库将WCF服务与SQL-CLR存储过程连接-SQL-CLR抛出错误

C# 通过类库将WCF服务与SQL-CLR存储过程连接-SQL-CLR抛出错误,c#,sql-server,wcf,stored-procedures,sqlclr,C#,Sql Server,Wcf,Stored Procedures,Sqlclr,我正在尝试构建一个原型,其中WCF服务托管在windows控制台应用程序中,一个类库(DLL)正在从WCF访问该服务,WCF被称为SQL CLR存储过程的引用 我引用了MSDN中的以下文章 列出组件 我的WCF服务-运行良好 调用服务或服务客户端的类库 SQL-CLR存储过程 我的SQL-CLR存储过程类在此处显示问题。。。 我已经成功地在visual studio中的SQL-CLR存储过程中注册了程序集,但是当整个系统一起工作时,我得到了以下错误 public static voi

我正在尝试构建一个原型,其中WCF服务托管在windows控制台应用程序中,一个类库(DLL)正在从WCF访问该服务,WCF被称为SQL CLR存储过程的引用

我引用了MSDN中的以下文章

列出组件

  • 我的WCF服务-运行良好
  • 调用服务或服务客户端的类库
  • SQL-CLR存储过程
  • 我的SQL-CLR存储过程类在此处显示问题。。。 我已经成功地在visual studio中的SQL-CLR存储过程中注册了程序集,但是当整个系统一起工作时,我得到了以下错误

         public static void spCallWcfService (string name)
    {
        {
            try
            {
    
                SqlPipe sqlPipe = SqlContext.Pipe;
                string new_name = String.Format(name);
                string result = MyClassLibrary1.MyClass.TestFunc(new_name);
                SqlContext.Pipe.Send("Call Succesful");
            }
            catch (Exception ex)
            {
                SqlContext.Pipe.Send(ex.Message);
                //SqlContext.Pipe.Send("Connection works, but there is error!");
            }
        }
    
    我对spCallWcfService的调用成功,但我与类库的连接(该类库与服务对话)引发了以下错误

    错误代码如下所示。 “未找到设置属性“MyClassLibrary1\u svcService\u Service1”

    在初始连接期间,我的第一个错误代码被推送到SQL管道,如下所示

    Msg 6522, Level 16, State 1, Procedure callWcfTest, Line 0
    A .NET Framework error occurred during execution of user-defined routine or aggregate "callWcfTest": 
    System.MissingMethodException: Method not found: 'System.String MyClassLibrary1.MyClass.TestFunc(System.String)'.
    System.MissingMethodException: 
       at StoredProcedures.spCallWcfService(String name)
    
    MyClass库代码如下,它使用Web服务

        public static string CallWcfService(string name)
        {
            string result = string.Empty;
            using (Service1 client = new Service1())
            {
                result = client.SayHello(name);
            }
            return result;
        }
    
    我的疑问如下:

  • 我认为类库和CLR库之间的问题是什么, 我已经正确引用了DLL,构建成功 没有错误的VisualStudio
  • 在SQL CLR中对类库的引用是否正确 存储过程
  • 请帮帮我,我卡住了