REST / SOAP endpoints for a WCF service

BEST (worked for me): http://www.topwcftutorials.net/2013/09/Simple-Steps-For-RESTful-Service.html

I tried this but didn’t work: http://stackoverflow.com/questions/186631/rest-soap-endpoints-for-a-wcf-service

 

http://www.c-sharpcorner.com/UploadFile/mahakgupta/a-simple-example-of-wcf-service/

Advertisements

WCF Service and .Net Client Issues

I have a WCF Svc and a WebAPI Client that calls it…

I simply added a svc ref. for the WCF svc. And tried to consume it like this:

var client = new ServiceReference1.Service1Client();

This gave a build error:

The type or namespace name ‘Service1Client’ could not be found (are you missing a using directive or an assembly reference?)

Finally I gave up and downloaded this: http://www.codeproject.com/Articles/531332/Implementing-a-Basic-Hello-World-WCF-Service-v4-5

Actually in this eg. Its very basic

Finally I went Back and solved my issue : http://stackoverflow.com/questions/3977560/service-reference-error-failed-to-generate-code-for-the-service-reference

This is the issue and soln description.

 

Another issue is that If I create a Svc Ref with a default name, the way to create a client instance is:

 

var client = new ServiceReference1.Service1Client();

 

But in case I give it my oen name, then how would I discover what the name would be ?

Configure Pluggable SOAP Extension

Please follow the below steps to configure the dll (SoapExtensionSampleDll.dll) in your web application:

1. Copy the compiled dll SoapExtensionSampleDll.dll  from the given solution to the bin directory of your web application

2. Add following configuration to your web.config :

1.  Register the dll :

<dependentAssembly>

<assemblyIdentity name=”SoapExtensionSampleDll” />

</dependentAssembly>

2.  Register the Soap Extension:

<soapExtensionTypes>

<add type=” SoapExtensionSampleDll.MySoapExtension, SoapExtensionSampleDll, Version=1.0.0.0, />

</soapExtensionTypes>

How To Migrate From Asmx To WCF

BEST: http://blogs.msdn.com/b/trobbins/archive/2006/12/02/integrating-wcf-with-your-existing-asmx-services.aspx

http://stackoverflow.com/questions/5686320/asmx-to-wcf-conversion

Simple Eg: http://stackoverflow.com/questions/12094256/moving-asmx-service-to-wcf-basic-binding-service

http://stackoverflow.com/questions/1502298/how-much-effort-is-required-to-convert-an-asmx-to-wcf-web-service

  1. To do Kerberos/NTLM with WCF, follow: http://social.msdn.microsoft.com/Forums/vstudio/en-US/0aac0110-187e-4a00-a597-f15b768cf16c/passing-client-credentials-to-wcf-service
  2. Set up Kerberos Authentication with Delegation on IIS 7 w/ Windows Server 2008

Communivating (client to server) in Real Time VS in Chunks

 

S. No.

Real Time (wsDualHttpBinding)

Chunked

1.

The no. of http connections increase to 2x

No. of http connections will be > 2x, depending on the size of chunk
and the requirements to send exceptions in real time

2.

All connections are long lived so 1 thread is blocked for each http
request forever

All connections are short lived, so the thread is not blocked for a
long time.

3.

Real time reporting and tracking is possible

Delayed reporting (Delay depends on the size of the chunk and the
latency configured)

4.

Real Time messages so no file to write to.

Latency in writing to the log file and sending it over

This is what I had listed before doing this Tutorial: http://www.codeproject.com/Articles/491844/A-Beginners-Guide-to-Duplex-WCF

Now I See that with wsDualHttpBinding, every call to the
endpoint is a new method and so the only best way to keep both the channels
open is to do long polling at both sides…which is complicated specially when implemented
with Async stuff….

 

 

–>