I will post this question, although I see that there are several others like this. However, I cannot find a satisfactory solution for any reason why I get this error and how to solve it.
So, today I had to host the service on my local computer for testing. The service is one WCF service solution, and it works, as far as I know, for a long time. However, when I downloaded the project and tried to host this service on my local computer, I got an error from the header:
This operation is not supported in the WCF test client because it uses the System.Threading type
So, when I returned home, I decided to make a service using some asynchronous methods and figure it out. However, I was very surprised when I get this same error on an almost empty project that does not use (or at least seems to be) System.Threading.Tasks anywhere.
So what I did:
And leaving the default web.config , which looks like this:
<system.serviceModel> <behaviors> <serviceBehaviors> <behavior> <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> <protocolMapping> <add binding="basicHttpsBinding" scheme="https" /> </protocolMapping> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> </system.serviceModel>
I didnβt even try to use Task , Threading or something like that, I just wanted to see that my service was up and running, so I can start adding things and see exactly when I get the error but, to my surprise, after installing Service1.svc as my launch class and trying to start the project, I got the same error:
This operation is not supported in the WCF test client because it uses the System.Threading type
OK, now I'm completely lost. I got this error after several attempts to start my project. Before posting this question, I tried again, and this time I did not get an error. Actually, I just finished my client, and I can use the GetEmpId() method.
So what is going on here. This is a screenshot when creating my project:

I do not have a GetEmpIdAsync() method. I did not try to add it. And how does this happen, it will not build several times, and now suddenly I can use the method that I actually implemented from the very beginning?