Hi,I'm new to GeoSpatial coding. i found a sample code at [url]http://msdn.microsoft.com/en-us/magazine/dd434647.aspx[/url] and trying to run its 'catalog_geocoder.sql' file. All is going well but on the select statement it is giving error bellow-Msg 6522, Level 16, State 2, Line 2A .NET Framework error occurred during execution of user-defined routine or aggregate "geocode": System.Net.WebException: The request failed with HTTP status 401: Unauthorized.System.Net.WebException: at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at MappointGeocoder.MapPointRef.FindServiceSoap.FindAddress(FindAddressSpecification specification) at Spatial.MpGeocoder.Geocode(String streetAddress)
Here I'm pasting the codealter database pubs set trustworthy ongouse pubsgosp_configure 'clr enabled', 1;GORECONFIGURE;GOcreate assembly geocode from 'C:\temp\MappointGeocoder.dll'with permission_set = external_accessgocreate assembly ser from 'C:\temp\MappointGeocoder.XmlSerializers.dll'with permission_set = safegocreate function dbo.geocode (@address nvarchar(4000))returns nvarchar(100)asexternal name geocode.[Spatial.MpGeocoder].Geocodegoselect dbo.Geocode('One Microsoft Way, Redmond, WA 98052');gocreate function GeocodePoint(@address varchar(100))returns geographyasbegindeclare @g geography;select @g = geography::STPointFromText(dbo.Geocode(@address), 0);return @gendgoselect dbo.GeocodePoint('One Microsoft Way, Redmond, WA 98052').ToString();go
Also i placed the files into c:/Temp as i mentioned the path above. Here both select statements are giving same error.Please help ASAP