Hi guys, im pretty much done with my program but im receivin an error that i cant find where it its.
Im using a WPF application in visual studio and it uses a service reference that contains addresses and zip codes. The purpose of the program is for the user to select numbers in the GUI and search for a city with the Zip code he inputs. First, im just trying to test the function by setting the parameters myself. This is the code.

`Class MainWindow

Public zipClient As ZipCodeReference.AddressLookupSoapClient

Private Sub btnSearch_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles btnSearch.Click
    Dim searchResults As zipCodeSearch.ZipCodeReference.Address
    searchResults = zipClient.ReturnCityState("33919", "0")

End Sub
End Class

the zipClient.ReturnCityState function mas include zipcode as string and license as string/ License should be 0.

When i test it. It only gets to that line the searchResults = zipClient.ReturnCityState("33919", "0") and stops and give me this error : "NullReferenceException was unhandled.Object reference not set to an instance of an object."

I will really appreciate your help. Thanks

6 Years
Discussion Span
Last Post by rigoalhn

wanted to add that since this is a swervice reference, the functions i believe are already created. This is that it says fot the returnCityState

Function ReturnCityState(zipcode As String, LicenseKey As String) As zipCodeSearch.ZipCodeReference.Address
Member of zipCodeSearch.ZipCodeReference.AddressLookupSoap

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.