WCF error – There was no endpoint listening at

You do not define a binding in your service’s config, so you are getting the default values for wsHttpBinding, and the default value for securityMode\transport for that binding is Message. Try copying your binding configuration from the client’s config to your service config and assign that binding to the endpoint via the bindingConfiguration attribute: <bindings> … Read more

Why is using [DataMember(EmitDefaultValue = false)] not recommended?

The reason is at the bottom of the article that you link to. The short version is: When the EmitDefaultValue is set to false, it is represented in the schema as an annotation specific to Windows Communication Foundation (WCF). There is no interoperable way to represent this information. In particular, the “default” attribute in the … Read more

How can I combine the WCF services config for both http and https in one web.config?

Well, one problem with your combined config is that your two endpoints are on the same address – that won’t work. If you’re hosting in IIS, then your server, virtual directory and the *.svc file needed will determine your basic address – it’ll be something like: http://yourservername/VirtualDirectory/YourService.svc If you want to have two endpoints, at … Read more

HTTPS from a console application?

Create and install a root authority and HTTPS certificate Open command prompt as Administrator: Create folder C:\Certs and navigate to it. #Root Authority makecert.exe -r -pe -n “CN=My Root Authority” -ss CA -sr LocalMachine -a sha1 -sky signature -cy authority -sv CA.pvk CA.cer #Certificate makecert.exe -pe -n “CN=localhost” -a sha1 -sky exchange -eku 1.3.6.1.5.5.7.3.1 -ic … Read more

Cannot implicitly convert type ‘bool’ to ‘system.threading.tasks.task bool’

You need to be specific whether you want this operation happen asynchronously or not. As an example for Async Operation : public async Task<bool> login(string usn, string pwd) { DataClasses1DataContext auth = new DataClasses1DataContext(); var message = await (from p in auth.Users where p.usrName == usn && p.usrPass == pwd select p); if (message.Count() > … Read more

techhipbettruvabetnorabahisbahis forumuedueduseduseduseduseduseduedueduedu