views:

19

answers:

1

Hi,

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.

+1  A: 

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.

Oded
I want to get the parameters that is passed and check manually in db, as when i run the webservice via my test application it works, but when the same application when referenced, it doesn't work. In other words when i pass the same params directly as parameter and test webservice it works, but when it is referenced, parameters passed it does not work.
Sharpeye500
@Sharpeye - I don't understand what you mean when you say "when it is referenced". Can you edit your question and post the relevant code?
Oded
I have edited, does it makes sense now, thanks for the inputs Oded.
Sharpeye500
@Sharpeye - not really. In your comment to my answre, you are saying you have a problem. You don't even mention it in your question!
Oded