Last post Mar 18, 2014 08:15 AM by dvnandover
Mar 12, 2014 10:11 AM|dvnandover|LINK
I have created a large web service (lots of webmethods) and i would like to determine how often each of those methods are being called so i log the data in a table of a sql database by inserting a new record everytime a web method is called. Using c# codes,
I could determine programmatically the userId and the ip address using Contect.Request object. But the most important data that i want to log is the name of the application or tool that comsumed my web service. Is that posible to do? if so where does the info
Mar 12, 2014 10:14 AM|AidyF|LINK
You would have to add a "clientname" type property to your webservices and have the clients populate it.
Mar 12, 2014 10:19 AM|dvnandover|LINK
Thanks AidyF for your reply.
I have thought about it but It would involved code changes from the clients and I don't think they like it since most of these applications have been running for quite a while. Is this the only solution?
Mar 12, 2014 10:30 AM|PatriceSc|LINK
Most often web service providers are issuing unique keys(s) to developpers to track and manage the usage and basically act as a kind of app identifier... See the registration process for Google or Bing APIs and how they manage their "API keys".
Mar 17, 2014 10:54 PM|Fuxiang Zhang - MSFT|LINK
Thanks for posing to asp.net forum.
As other member mentioned, you should ask client send their application information to your web service if you want
to know the client application name. Please note that client only consumes the webservice - that means there is no connection between
the client and the service apart from the request(s). What you can get from client is the
So I think the only solution is client provide their application name.
Mar 18, 2014 08:15 AM|dvnandover|LINK
Thank you all for your replies. I am making the changes to my codes so the user will enter the application name to my web service.