|
|
|
date: Sun, 7 Oct 2007 00:08:00 -0700,
group: microsoft.public.mappoint.webservice
back
Credentials fail when performing RenderServiceSoap.GetMap
My SOAP credentials work fine for performing any actions against my own data
source, but when I try to perform a GetMap against 'MapPoint.NA', I get the
following error:
System.Web.Services.Protocols.SoapException: Either the specified data
source does not exist, or your subscription does not allow you access. For
information on upgrading your subscription, contact your MapPoint .NET
representative. 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
net.mappoint.service.RenderServiceSoap.GetMap(MapSpecification specification)
in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\root\95746e88\9508ebfd\App_WebReferences.77yihide.0.cs:line 1064 at
UserControls_LocationSearch.RenderMap(Double myPanHorizontalAdjustment,
Double myPanVerticalAdjustment, Double myZoomValue, String Specialty) in
d:\inetpub\wwwroot\UserControls\LocationSearch.ascx.vb:line 2376
I believe this is all of the relevant code:
Dim myView As New ViewByHeightWidth
myView.CenterPoint = myPushPins(drowCounter).LatLong
myView.Height = SearchRadius(Specialty) * 2
myView.Width = SearchRadius(Specialty) * 2
Dim myViews(0) As ViewByHeightWidth
myViews(0) = myView
Dim mapSpec As New MapSpecification
mapSpec.Pushpins = myPushPins
mapSpec.Views = myViews
mapSpec.DataSourceName = "MapPoint.NA"
mapSpec.Options = New MapOptions
mapSpec.Options.ReturnType = MapReturnType.ReturnImage
mapSpec.Options.Format = New ImageFormat
mapSpec.Options.Format.Height = 325
mapSpec.Options.Format.Width = 325
'Declare the map image array and get the map
Dim myMapImages() As MapImage
Try
renderService.Credentials = New
NetworkCredential(ConfigurationSettings.AppSettings("MPUser"),
ConfigurationSettings.AppSettings("MPPass"))
renderService.PreAuthenticate = True
myMapImages = renderService.GetMap(mapSpec)
It breaks on that last line. When I try to do this with any other service -
i.e. a Find Service, it works fine.
date: Sun, 7 Oct 2007 00:08:00 -0700
author: Jason Simone Jason
RE: Credentials fail when performing RenderServiceSoap.GetMap
Do you have a development account? If so it is possible that you only have
access to the staging environment. If your web reference is pointing to the
service/production environment then you would get the authentication error.
"Jason Simone" wrote:
> My SOAP credentials work fine for performing any actions against my own data
> source, but when I try to perform a GetMap against 'MapPoint.NA', I get the
> following error:
>
> System.Web.Services.Protocols.SoapException: Either the specified data
> source does not exist, or your subscription does not allow you access. For
> information on upgrading your subscription, contact your MapPoint .NET
> representative. 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
> net.mappoint.service.RenderServiceSoap.GetMap(MapSpecification specification)
> in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
> Files\root\95746e88\9508ebfd\App_WebReferences.77yihide.0.cs:line 1064 at
> UserControls_LocationSearch.RenderMap(Double myPanHorizontalAdjustment,
> Double myPanVerticalAdjustment, Double myZoomValue, String Specialty) in
> d:\inetpub\wwwroot\UserControls\LocationSearch.ascx.vb:line 2376
>
> I believe this is all of the relevant code:
>
> Dim myView As New ViewByHeightWidth
> myView.CenterPoint = myPushPins(drowCounter).LatLong
> myView.Height = SearchRadius(Specialty) * 2
> myView.Width = SearchRadius(Specialty) * 2
> Dim myViews(0) As ViewByHeightWidth
> myViews(0) = myView
> Dim mapSpec As New MapSpecification
> mapSpec.Pushpins = myPushPins
> mapSpec.Views = myViews
> mapSpec.DataSourceName = "MapPoint.NA"
> mapSpec.Options = New MapOptions
> mapSpec.Options.ReturnType = MapReturnType.ReturnImage
> mapSpec.Options.Format = New ImageFormat
> mapSpec.Options.Format.Height = 325
> mapSpec.Options.Format.Width = 325
>
> 'Declare the map image array and get the map
> Dim myMapImages() As MapImage
>
> Try
> renderService.Credentials = New
> NetworkCredential(ConfigurationSettings.AppSettings("MPUser"),
> ConfigurationSettings.AppSettings("MPPass"))
> renderService.PreAuthenticate = True
> myMapImages = renderService.GetMap(mapSpec)
>
> It breaks on that last line. When I try to do this with any other service -
> i.e. a Find Service, it works fine.
date: Tue, 9 Oct 2007 12:36:04 -0700
author: Richard_Brundritt
|
|