'WCF call to endpoint not updating the query string parameter

We are making for WCF calls to endpoints like below:

First Call:

http://TESTSERVER:11033/Services/GetServiceDetail?Userid=Test1 

Subsequent call:

http://TESTSERVER:11033/Services/GetServiceDetail?Userid=Test2  

While sending requests, we are passing Userid (can be any parameter) as a query string parameter to make some user specific decision at the backend. But when the next call is made with a different user id (subsequent call), the request to the backend still goes with (Userid=Test1).

If we restart the service, or use a different url, say ..../GetServiceDetailDifferent?Userid=Test2 then the user id passed is the correct one. I have closed the connection after making the web services call but still doesn't have an impact.

WCFClient proxy;

proxy = new WCFClient(nameEnd, endPointAddress);

try
{
    response = proxy.GetOperation(request);
}
catch (Exception)
{
    throw;
}
finally
{
    proxy.Close();
}

  


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source