Who is calling my WebService?

I have a web service that resides on an internal server. It can be accessed from any website on our network.

More and more developers are starting to use it. Probably 20+ pages are using this service, and the number is growing rapidly. I see a year later, someone asks which pages use this service and which methods.

I would like to register the URL of the pages that use my web service as I receive the request. It would also be good to know the method that they are calling. I need to do something so that it does not affect client websites. At first I thought that I could write code in global.asax.

I added some code to Application_BeginRequest to log the details of the request object, but nothing seems to be happening with the requesting URL.

What am I missing? Should I look at another object?

Thanks.

+3
source share
5 answers

@ David Stratton

Thank you for your help. I think your suggestions were wonderful. I essentially did something completely different after your answer gave me some new ideas.

I should have mentioned that I created web proxies that most of my users used to make calls against my web service. My client does NOT use the proxy server created by Visual Studio at all.

Here is what I did:

-- httpcontext . - , , . , . , . - -.

, . DLL. . , , .

, -.

, , - . , - . Visual Studio - . , , , . . , , , - - ASP.NET 1.1. , , , .

+1

. HttpContect.Current.RequestUrl URL-, -, -, .

, , , - HttpContext.Current.Request.UserHostAddress, IP- , .

, "CallingApp", . , , - , , . , GUID , , GUID -. , , , , .

-

, , , , - . , - , , .

, , , , . , - , , .

+3

, , , , IP- .

, , . , , "".

, , , , .

, , , , , .

+2

- guraenteeted , - - - , .

, , - - , .

0

...

Dim strReferrer As String = HttpContext.Current.Request.UrlReferrer.AbsoluteUri

to get the calling page that called the WEB API 2 web service.

0
source

Source: https://habr.com/ru/post/1723797/


All Articles