473,473 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

.net 2005 problem

it is same code using mappoint webservice which could run in .net 2003.but
couldn't run in .net 2005.
see the attached code.
*****************
Sub RenderMap(ByVal myPanHorizontalAdjustment As Double, ByVal
myPanVerticalAdjustment As Double, ByVal myZoomValue As Double)
Dim renderService As MSMapService.RenderServiceSoap = New
MSMapService.RenderServiceSoap
Dim ourCredentials As New
NetworkCredential(ConfigurationManager.AppSettings ("MPUser"),
ConfigurationManager.AppSettings("MPPass"))

renderService.Credentials = ourCredentials
renderService.PreAuthenticate = True

'Get the latest map specification object
Dim mapSpec As MapSpecification
mapSpec = CType(Cache("myMapSpec"), MapSpecification)
'Cache("myMapSpec")

'Pan or zoom the map as appropriate
mapSpec.Options.PanHorizontal = mapSpec.Options.PanHorizontal +
myPanHorizontalAdjustment
mapSpec.Options.PanVertical = mapSpec.Options.PanVertical +
myPanVerticalAdjustment

If Not (mapSpec.Options.Zoom + myZoomValue <= 0) Then
mapSpec.Options.Zoom = mapSpec.Options.Zoom + myZoomValue
End If

'Declare the map image array and get the map
Dim myMapImages() As MapImage

Try
myMapImages = renderService.GetMap(mapSpec)
****
here return nothing if u use 2005.but it is ok for 2003
*****

'Assign the map image url
MapImage.ImageUrl = myMapImages(0).Url
'Also restore the changed map specification
Cache("myMapSpec") = mapSpec
Catch myException As SoapException
'Your exception handling goes here
End Try

End Sub
*******************
any suggest appreciated
Thanks
Fred

Nov 19 '05 #1
0 934

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
by: Rene | last post by:
I keep getting the following error every time I compile the solution under VS 2005: ---------------- Error 5 Unable to copy file "obj\Debug\xyz.dll" to "bin\Debug\xyz.dll". The process...
18
by: surfrat_ | last post by:
Hi, I am having the following problems in getting Microsoft Visual Studio 2005 Professional to link to an Access .mdb database. Please help me to sort this out. Problem 1: The Microsoft...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.