Question

We have published a few arcgis services and I was wondering if there is a way to capture incoming requests on certain services and store them in a database (mssql) using .NET and C#. I am only looking for the IP that the request came from, the timestamp, and the service they used.

For instance, let's say I have a published service.

www.yourdomain.com:6080/arcgis/rest/services/usa_gecoder. I would simply like to store his ip, usa_geocoder, and datetime it was accessed.

No correct solution

OTHER TIPS

Is there any particular reason why you can't use IIS logs? In my experience, I've installed arc server (10.1) in a windows environment and have installed the web adaptor as well which installs itself as an IIS application. Since the web adaptor handles rest service requests, all of the requests to your services will be included in your IIS logs including uri-stem, uri-query, client ip, etc. You could even use LogParser version 2.2 to filter through your logs.

If this isn't an option for you, then like pickypg mentioned, use a handler, preferably the one that esri provides as a start. Using this proxy handler, you can customize it to record the data you were needing by parsing out the URI and grabbing the rest of your data from HttpContext.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top