System.DllNotFoundException: Unable to load DLL 'SqlServerSpatial110.dll': The specified module could not be found

3

I am doing a project which having some functions on Geographical distance calculation. So I use geographical datatypes in entity framework by adding nuget package SqlServerSpatial110.dll for that function.

I think my code is correct. Everything is working on local server. But when I uploaded it to server it shows the error below:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: Unable to load DLL 'SqlServerSpatial110.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

please tell me the steps to upload SqlServerSpatial110.dll to server.

c#
asp.net
.net
dll
geospatial
asked on Stack Overflow Jan 30, 2015 by John Antony • edited Jan 30, 2015 by John Antony

2 Answers

3

Add the reference of Microsoft.SqlServer.Types in Web.config of application resolved the issue.

<runtime><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" />
    <bindingRedirect oldVersion="1.0.0.0-11.0.0.0" newVersion="10.0.0.0" />
  </dependentAssembly>
</assemblyBinding></runtime>
answered on Stack Overflow Aug 17, 2019 by Richie
0

Please check to make sure the DLLs are installed on the server:

C:\Program Files (x86)\Microsoft SQL Server\110\SDK\Assemblies\Microsoft.SqlServer.Types.dll
C:\Windows\System32\SqlServerSpatial110.dll

Please check your AppPool. If you are re-using an old AppPool, make sure your AppPool Advanced Settings --> Enable 32-Bit Applications is False.

This fixed my similar problem on a Windows 2012 Server.

answered on Stack Overflow Jul 25, 2016 by Tracy G • edited Jul 25, 2016 by techspider

User contributions licensed under CC BY-SA 3.0