I have seen questions regarding this but not exactly my scenario:
I have created a service. It runs on one server that is also a web server. It looks at a remote server running SQL Server to gather data to run.
When getting data from one of the tables, there is a column with a geography data type. In the web application that is running, no problems getting this table as Microsoft.SqlServer.Types.dll
is referenced.
A service running on the Web server creates and error:
DataReader.GetFieldType(22) returned null.
When doing a select statement on this remote machine even the same dll is referenced.