0

We develop SQL CLR stored procedure which calls methods of a web-service. We use VS2010 to develop and debug this project. The problem is the following exception when we try to start test script which calls our stored procedure:

A .NET Framework error occurred during execution of user-defined routine or aggregate
"WebServiceExample": 
System.InvalidOperationException: Could not find default endpoint element that
references  contract 'ServiceReference1.ExRatesSoap' in the ServiceModel client
configuration section.  This might be because no configuration file was found for your
application, or because no  endpoint element matching this contract could be found in
the client element.
System.InvalidOperationException:
...

There are some recomendations regarding this problem in the Net which use wsdl.exe and sgen.exe utilities along with another manipulations. But we are interested in solution which utilizes only VS2010 tools, settings, options, etc. It's seemed unbeleivable that VS2010 can't cook this pie from beginning to end, we think we are doing something wrong.

4

1 回答 1

0

您可能必须在配置文件中手动创建对 Web 服务的引用,例如从 SQL Server 调用它的 sqlserver.exe.config。这些不是为 SQL CLR 自动创建的,因为它是由 SQL Server 执行的。

于 2012-10-16T13:20:04.103 回答