locked
Microsoft.SqlServer.Types NOT Supported in .aspx view and .cshtml view page??? RRS feed

  • Question

  • I try to use SqlGeography in  .aspx view and .cshtml view page, but get errors

    The error is that Microsoft.SqlServer.Types dll is NOT regonised by .NET.

    In my project, the Microsoft.SqlServer.Types dll is referenced, and its namespace is also referenced on the view page. However, error reports the dll is not used.

    Anyone who is able to use SqlGeography/SqlGeometry on .aspx/.cshtml view page?

    • Edited by Pingpong689 Friday, December 10, 2010 5:44 PM
    Thursday, December 9, 2010 1:50 PM

Answers

  • I've already had this issue, and don't know if you resolved it yet, but here is the point :

    Microsoft.SqlServer.Types.dll is not sufficient enough because it needs also a C DLL named SqlServerSpatial.dll (which can be found in your system32 directory).

    Put that SqlServerSpatial.dll file in you web's bin directory and the error will not occur anymore.

    • Marked as answer by Pingpong689 Thursday, March 10, 2011 1:24 PM
    Thursday, March 10, 2011 12:20 PM

All replies

  • Post errors
    Friday, December 10, 2010 2:20 PM
  • @Kbalz: What do you mean by Post Errors??
    Friday, December 10, 2010 5:04 PM
  • I try to use SqlGeography in  .aspx view and .cshtml view page, but get errors
    What are the errors you're getting - "Webpage not found", "Cannot connect to printer", "Your password has expired"?
    Please help us to help you.
    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Friday, December 10, 2010 5:35 PM
    Answerer
  • @tanoshimi

    My original post has been changed, please refer to my first post on this thread for details.

    Friday, December 10, 2010 5:45 PM
  • I've already had this issue, and don't know if you resolved it yet, but here is the point :

    Microsoft.SqlServer.Types.dll is not sufficient enough because it needs also a C DLL named SqlServerSpatial.dll (which can be found in your system32 directory).

    Put that SqlServerSpatial.dll file in you web's bin directory and the error will not occur anymore.

    • Marked as answer by Pingpong689 Thursday, March 10, 2011 1:24 PM
    Thursday, March 10, 2011 12:20 PM
  • Thanks, I will try it.
    Thursday, March 10, 2011 1:24 PM