Search code examples
c#web-servicesparametersclientdifferentiation

Accessing parameters in a webservice from a different application


I have C# webservice webmethods hosted on a server and accessed by different applications(web,winforms etc).

Is there any way i can detect that these parameters are sent from winforms, these are from webservices on a webservice?

All they do is adding a web reference and passing parameters, i wish to see in my end what parameters they pass (to test some use cases).

Any thoughts?

Thanks.


Solution

  • If you want to differentiate calls from a webform vs a winform, you will need to build that into the method calls themselves.

    For example, you could add a parameter to each method that maps to type of client and find out that way.

    The whole point of web services is that they are client agnostic - so long as the call is correct, it doesn't matter what kind of application called the web service.