Author: Peter Smith | Posted on: 10/12/2008 3:18:44 AM | Views : 333

I'm building a webservice. I dont want just anyone to use my webservice so I want to spread APIKeys, just like google maps basically.
This key is linked in my DB to a hostname. So with a certain key only from a certain host my webservice can be called.

Here's my webservice signature (currently not doing anythnig yet with hostname or apikey):
    <WebMethod()> _
    Public Function GetDetails(ByVal APIKey As String, ByVal ID As String, ByVal Hostname As String) As DataSet
        Return GetDataSet("select * from users where ID='" + ID + "'")
    End Function

BUT, now, when calling this webservice, the user has to make sure he provides the apikey, hostname and userid himself....ofcourse I dont want the calling party to be able to provide his own hostname, I want to determine what host it was called from myself. How do ...

Go to the complete details ...