locked
Problem with MapPoint Service RRS feed

  • Question

  •  

    Hi,

    I get the following errors while I try to invoke Mappoint Service.(http://staging.mappoint.net/standard-30/mappoint.wsdl.) 

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.Services.Protocols.SoapException: Server was unable to process request. --> The root element is missing.

                                                    OR

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host.

    I have observed that this is not a consistent behaviour as well! The  web service works fine as well sometimes and I get the desired results. But when I continously try to access the same,it fails between consequent requests.

    I checked a few forums and  observed that people faced these problems when they generally accessed some remote web services  through a proxy server and a firewall. I also work in similar conditions. I even tried testing my code outside the proxy server. It still fails.Also,I tried the following method of overriding the Webrequest  as suggested by some forums.But this does not work as well.

    protected override System.Net.WebRequest GetWebRequest(Uri uri)
            {

                System.Net.HttpWebRequest webRequest = (System.Net.HttpWebRequest)base.GetWebRequest(uri);
                webRequest.KeepAlive = false;
                webRequest.ProtocolVersion = HttpVersion.Version10;
                return webRequest;
            }

    I am just adding a web reference to the above URLand invoking methods on them. Also, I am using the SDK samples for Map point.So, I do not think there is any error from my client side. Could this be a limitation with these web services or do I need to do any settings from my end to solve this issue?Please help!

    Thanks in Advance!

    Thursday, March 29, 2007 6:35 AM

All replies

  • are you trying to connect through a proxy server? you might want to check that and enable proxy on your WSE settings file.
    Wednesday, April 4, 2007 4:12 AM
  • Thanks. Yes,I am connecting through a proxy server and I have enabled the proxy in the WSE Settings file.Problem still persists.

    But  if I deploy my solution on the sandbox(and accordingly remove all my proxy server related code and settings),I do not get this error and MapPoint Service gives back a proper result. I guess this is because,Sandboz does not  connect through a proxy. Am I right?

    Thursday, April 19, 2007 8:51 AM
  • Hi All,

     

    I am facing very different type of problem while working with Mappoint.

     

    I have downloaded Mappoint sample, I opened the .proj file of variour projetcs like( Find, FindNearBy, Route, etc, etc) and updated the WebReference by right clicking on it. And everything worked fantastically.

    But, I made my own project, added a webreferance  "http://staging.mappoint.net/standard-30/mappoint.wsdl"

    it does not work. I infact created a proxy class by using wsdl tool but still i am getting the same error which says

     

    ex.Message:  "Unable to connect to the remote server"

    InnerException.Message: "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"

     

    When everything is same why am I getting this error when I am running my sample.

     

    Please help!!!

     

    Many Thanks,

     

     

    Friday, April 20, 2007 6:31 AM
  • Hi,

     

    I have faced similar problems with MapPoint when I worked behind a proxy server and firewall. Try testing your sample outside these settings and check if you still get the same error.

     

    Regards.

    Thursday, April 26, 2007 5:09 AM
  • Hi CSFDeveloper,

     

    Were you able to find a solution to this problem?  I think I'm having the same problem when doing a findneaby search.

     

    Tuesday, October 23, 2007 1:51 PM
  • Hi,

     

    Did you find the solution?

     

    Sunday, December 9, 2007 6:44 AM
  • hello ,plzz i need some help ,

     

    i wanna try to use mappoint service to show maps in an application with C#

     

    i have already create an account a free trial ,but the probléme id ont have some interesting tutorial or steps to begin with.

     

    plzz i need some help from u gays ,it's for a project for my studies.

     

    i tried some codes from a web site but they dont work,i have the same exception ?

     

     

    thanks a lot

    Saturday, May 3, 2008 1:13 AM
  •  amine barigo wrote:

    hello ,plzz i need some help ,

     

    i wanna try to use mappoint service to show maps in an application with C#

     

    i have already create an account a free trial ,but the probléme id ont have some interesting tutorial or steps to begin with.

     

    plzz i need some help from u gays ,it's for a project for my studies.

     

    i tried some codes from a web site but they dont work,i have the same exception ?

     

     

    thanks a lot

    Hi Amine,

    If you want a good example of how to display a map from a web service check out the example at the end of Chapter 11 of "Programming Microsoft .NET" by Jeff Prosise. 

    http://www.amazon.com/Programming-Microsoft-NET-Jeff-Prosise/dp/0735613761

     

    Adam Coath

    Schakra Inc.

     

    Monday, May 5, 2008 5:51 PM
  • hi,

    i am  also having the same pblms with mappoint web service, i am syuing vs 2005 /asp.net2.0/

    when i added the web reference and trying to create a  instance of the  class

    FindAddressSpecification findAddrSpec = new FindAddressSpecification();

    it throws the  infamous "unable to connec to the remote server" error. I  am not behind any proxy / firewall.

    the inner exception shows that

    "System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)."

     

     and normal exception message is "Unable to connect to the remote server"

     

    Is anyboy from the  MSFT virtual earth team look into this? to sort out what  is the crux of the peoblem?

     if I am not behind any proxy / firewall, what is causing the pblm?

    if there is any problem with my internal network? what will cause?what shoudl I do to safe connection with the  microsoft's staging .mappoint web server,

      i have a soap CSS-live account and password, that virtual earth account name/ passsword only i have passe dthru netwrokcrdentials  class .

    my url is :

    http://staging.mappoint.net/standard-30/mappoint.wsdl and

     

    here is my sample code:

    string userID = ConfigurationManager.AppSettings["MapPointWSUsername"].ToString();

    string password = ConfigurationManager.AppSettings["MapPointWSPassword"].ToString();

    NetworkCredential creds = new NetworkCredential(userID, password);

    MPStagingWebReferenceOct2.FindAddressSpecification findAddrSpec = new MPStagingWebReferenceOct2.FindAddressSpecification();

    findAddrSpec.InputAddress = new MPStagingWebReferenceOct2.Address();

    findAddrSpec.InputAddress.PostalCode = "UB2 8QA";

    findAddrSpec.InputAddress.CountryRegion = "UK";

    findAddrSpec.DataSourceName = "mydatasourcename";

    MPStagingWebReferenceOct2.FindServiceSoap findService = new MPStagingWebReferenceOct2.FindServiceSoap();

    findService.Credentials = creds;

    findService.PreAuthenticate = true;

    MPStagingWebReferenceOct2.FindResults foundAddrResults;

    foundAddrResults = findService.FindAddress(findAddrSpec);

    if (foundAddrResults.NumberFound < 1)

    {

    Response.Write("Sorry no map found");

    }

     

    Thursday, October 2, 2008 10:31 AM