I know it\'s not supported, and I know it\'s not even a terribly good idea. But, I want to have a WCF client inside a SQL Table Valued Function.
I\'ve (seemingly) re
This article might help you find out what the true underlying exception is and to see how fatal it is:
http://jdconley.com/blog/archive/2007/08/22/wcfclientwrapper.aspx (archive.org copy)
As David correctly says, the SQL CLR has support for a limited subset of .NET assemblies:
SQL 2005 Supported .NET Framework Libraries
SQL 2005 CLR Integration Programming Model RestrictionsSQL 2008 Supported .NET Framework Libraries
SQL 2008 CLR Integration Programming Model Restrictions
System.Web.Services
is supported if the end point is a WSDL service so that might help you get out of a hole? Or you could always use a web service as a proxy to whatever non-webservice WCF endpoint you're trying to talk to.