LocationServiceSoap.SetNewContactNotification Method

Sets the value of the notify on contact option for the current user.

Public Sub SetNewContactNotification (notify As System.Boolean)

public SetNewContactNotification (System.Boolean notify);


  • notify
    A Boolean value that is used to set the notification on new contact flag for the current user. For information about the term notify on contact, see the Glossary.


This method accepts the following SOAP headers:

UserInfoLocationHeader—Used to establish the current user's (the user that is invoking the location service) specific information such as culture information and so on. When this SOAP header is not provided, the current user's default culture is applied. For more information, see UserInfoLocationHeader Class.

ClientIdHeader—Not used with MapPoint Location Server 1.0.

For information about the terms notification and notify on contact, see the Glossary.

Because this is a Web service, all exceptions appear as SOAP exceptions. For more information, see the SoapException.Detail property.


[Visual Basic]
    'Create a LocationServiceSoap proxy instance.
    Dim MyLocationService As New LocationServiceSoap
    'Create and add the credentials required to access the Web service.
    Dim MyCredentials As New NetworkCredential("user", "password", "DOMAIN")
    MyLocationService.Credentials = MyCredentials

        'Set the notify on new contact for the current user

    Catch MyException As SoapException
        'Your exception processing goes here.
        If ((Not MyException.Detail Is Nothing) And (Not MyException.Detail("Type") Is Nothing)) Then
        End If

        'Your cleanup goes here
        MyLocationService = Nothing
    End Try

  //Create a LocationServiceSoap proxy instance.
  LocationServiceSoap MyLocationService = new LocationServiceSoap();
  //Create and add the credentials required to access the Web service.
  NetworkCredential MyCredentials = new NetworkCredential("user", "password", "DOMAIN");
  MyLocationService.Credentials = MyCredentials;

   //Set the Contact Notification flag for the current user
   //True means that the user gets a notification if he/she is added as a contact to somebody else's list
   //False means that the user does NOT get a notification if he/she is added as a contact to somebody else's list
  catch(SoapException MyException)
   //Your exception processing goes here.
   if (MyException.Detail != null && MyException.Detail["Type"] != null)
   //Your cleanup goes here
   MyLocationService = null;

See Also

Location Service Class  |  UserInfoLocationHeader Class  |  Notify Definition  |  Contact Definition  |  Using Soap Headers