.net - WCF Client Inside SQL CLR -


I know that it is not supported, and I know that this is not a very good idea. But, I have to be a WCF client inside a SQL Table Valuable Function.

I have registered the correct assemblies (seemingly), but when my client is running - I get a WCF error:

Message 6522, Level 16, State 1 , Line 1 system. Service model Communication objectfold exception: communication object, system Servicemodel. ChannelFoint `1 [MyProxy.IMyService] can not be used for communication because it is in a defective state.

A test works out of SQL Server - and I do not see WCF clients trying to make a TCP connection.

Not sure whether it is WCF or SQL CLR points, as I am new to both .....

EDIT: I think the necessary system ServiceModel and its many assemblies are out of the vetted Sql CLR list. However,

"Unsupported libraries can still be called from your managed stored procedures, triggers, user-defined functions, user-defined types, and user-defined sets. In the SQL Server database, Before being used in your code, using the Assembly Statement statement, the security of any unsupported library that runs and runs on the server, and Behavior should be reviewed and tested. "

To find out what a real underlying exception is and how dangerous it is:

(archive.org copy)

, SQL CLR The support for a limited subset of Net Assemblies is:



System. .Services is supported if the end point is a WSDL service so that you can get help out of a hole? Or you can always use a web service as a proxy, which you are trying to talk to from the non-website WCF endpoint.


Comments