Ask a questionAsk a question
 

Answerhow to do category wise search?

Answers

All Replies

  • Monday, November 02, 2009 12:39 PMRichard_BrundrittMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Using map.Find limits your ability to filter the search. You will need to use either the Bing Maps Web Services or the MapPoint web services. These services will give you much more flexibility in terms of filtering. You can use AJAX to integrate these services with Bing Maps. http://msdn2.microsoft.com/en-us/library/cc316940.aspx
    Windows Live Developer MVP - http://rbrundritt.spaces.live.com
  • Wednesday, November 04, 2009 6:05 AMGuest11 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I tried the example shown in the link

     http://msdn2.microsoft.com/en-us/library/cc316940.aspx

    But i am getting an error saying

    Got the response text:
    Alert('Error:System.Net.WebException:The request failed with HTTP status 401:Unathorized. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage:mMessage, WebResponse response, Stream responseStream,Boolen asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodname,Object[] parameters) at MSWFind.MapPointService.FindServiceSoap.FindByProperty(FindByPropertySpecification specification) in
    C:\Document and Settings\Desktop\New Folder\MSWFind\MSWFind\WebReferences\MapPointService\Reference.cs:line 607 at MSWFind.MSWFindGenerator.FindByProperty(String datasource, String entityname, String findExpression,String parameters) in C:\Document and Settings\Desktop\New Folder\MSFing\MSWFind\MSWFindGenerator.aspx.cs:line84')

    Where is the problem? i don't understand this error.
  • Wednesday, November 04, 2009 9:42 AMRichard_BrundrittMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You need to get a developers account and use the credentials in the code to access MapPoint. You can get a developers account here: https://mappoint-css.live.com/MwsSignUp/Default.aspx
    Windows Live Developer MVP - http://rbrundritt.spaces.live.com
  • Wednesday, November 04, 2009 11:01 AMGuest11 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I had a developer account and i also add web reference.

    I have to manually give credentials information or it will automatically get the credential information after adding web reference.
  • Wednesday, November 04, 2009 1:17 PMRichard_BrundrittMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    In the article code the Class MWSFindGenerator has the following global variables:

    //TODO:  Change the following values to your username and password
    private String MPUser = ConfigurationManager.AppSettings["username"];
    private String MPPass = ConfigurationManager.AppSettings["password"];
    
    
    This code retrieves the credentials from a web config. You can either stor your credentials in a web.config file or simply set the values of MPUSer and MPPass to your username and password.



    Windows Live Developer MVP - http://rbrundritt.spaces.live.com
  • Thursday, November 05, 2009 5:24 AMGuest11 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I set the values of MPUser and MPPass. But than also it shows the same error.

    I tried to add web reference from the sample in the link

    http://msdn.microsoft.com/en-us/library/cc980844.aspx

    here they give example off Requesting Bing Map token. I follow the same steps as shown there i copied the url and paste it in the web reference option when i add web reference in my application when i paste the url and click Go it ask for user id and password i enter bothe user id and passwork and click ok but it gives error as

    "There was an error downloading 'https://staging.common.virtualearth.net/find-30/common.asmx?wsdl'.
    The request failed with HTTP status 400: Bad Request."
     
    What the error is? it think it is an url error.
  • Thursday, November 05, 2009 10:02 AMRichard_BrundrittMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    The initial error was a 401 error which was an error with credentials. If your getting an error adding the common service it could be the url. Try this url instead: https://staging.common.virtualearth.net/find-30/common.asmx

    The token services don't have ?wsdl appended to them.

    Windows Live Developer MVP - http://rbrundritt.spaces.live.com
  • Thursday, November 05, 2009 10:39 AMSVG83 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I am also facing the same problem I tried with the above url suggested by Richard https://staging.common.virtualearth.net/find-30/common.asmx it ask for user id and password i enter both id and password but it is giving the same error as above

    "There was an error downloading 'https://staging.common.virtualearth.net/find-30/common.asmx'.
    The request failed with HTTP status 400: Bad Request."
  • Thursday, November 05, 2009 10:40 PMRichard_BrundrittMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Try to access the URL from a browser. If you get the same error it is possible that either a proxy server or firewall is blocking the connection.
    Windows Live Developer MVP - http://rbrundritt.spaces.live.com
  • Friday, November 06, 2009 10:01 AMGuest11 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    https://staging.common.virtualearth.net/find-30/common.asmx i tried this url on browser and i get the blank page nothing on the page.
  • Friday, November 06, 2009 12:07 PMRichard_BrundrittMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    This is probably an issue with either a firewall or proxy server on your end or just network restrictions. If you send me an email at ricky_brundritt@hotmail.com I'll send you a list of IP's that you will need to allow.
    Windows Live Developer MVP - http://rbrundritt.spaces.live.com
  • Monday, November 09, 2009 10:12 AMGuest11 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    hi Richard,
    Thanks for ur coperation my prob is solved.
    • Marked As Answer byGuest11 Monday, November 09, 2009 10:13 AM
    •