0

Consider the code

[WebInvoke(UriTemplate="/{memId}/{username}")]
[ServiceContract]
void Method(string strMemId,string strUname)
{
// my code goes here
}

Are the parameters present in the UriTemplate,the same to the method parameters? If not, when will they be needed/required?

Thanks. Any inputs appreciated.

zishe
  • 10,665
  • 12
  • 64
  • 103
Sandeep
  • 278
  • 1
  • 6
  • 21

1 Answers1

0

If the method parameters are passed through the Uri, the order of transfer, you must set Uritemplate. your situation is would be (UriTemplate = "/ {strMemId} / {strUname}" ) If you do not, the program will not understand where to find the desired parameter

Welen
  • 1
  • 1