<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dotnet thoughts &#187; WCF</title>
	<atom:link href="http://www.dotnetthoughts.net/tag/wcf/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dotnetthoughts.net</link>
	<description>a dotnet developer&#039;s technical blog</description>
	<lastBuildDate>Wed, 08 Feb 2012 03:18:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to add MEX endpoints programmatically</title>
		<link>http://www.dotnetthoughts.net/2012/01/22/how-to-add-mex-endpoints-programmatically/</link>
		<comments>http://www.dotnetthoughts.net/2012/01/22/how-to-add-mex-endpoints-programmatically/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 02:49:13 +0000</pubDate>
		<dc:creator>Anuraj P</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[.Net 4.0]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Mex]]></category>
		<category><![CDATA[Mex EndPoint]]></category>

		<guid isPermaLink="false">http://www.dotnetthoughts.net/?p=2303</guid>
		<description><![CDATA[The Metadata Exchange Endpoint (MEX) is a special endpoint in WCF that exposes metadata used to describe a service.Without the MEX, you will not be able to use svcutil.exe to automatically generate a proxy class. Fortunately, it is a simply &#8230; <a href="http://www.dotnetthoughts.net/2012/01/22/how-to-add-mex-endpoints-programmatically/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The Metadata Exchange Endpoint (MEX) is a special endpoint in WCF that exposes metadata used to describe a service.Without the MEX, you will not be able to use svcutil.exe to automatically generate a proxy class.  Fortunately, it is a simply process to enable the MEX for your service. Here is the code which will add Mex endpoint programmatically. </p>
<pre class="brush: csharp; title: ; notranslate">
var metadataBehavior = serviceHost.Description.Behaviors.Find&lt;ServiceMetadataBehavior&gt;()
    ?? new ServiceMetadataBehavior();
serviceHost.Description.Behaviors.Add(metadataBehavior);
serviceHost.AddServiceEndpoint(typeof(IMetadataExchange),
    MetadataExchangeBindings.CreateMexHttpBinding(),
    &quot;http://localhost:8080/IService/Mex&quot;);
</pre>
<p>It should be noted that you are not required to enable HttpGet.  SvcUtil will still be able to access the MEX without it.  However, it is useful if you want to view the WSDL from a browser by going to the address of the service.  You cannot do so without enabling the HttpGet.</p>
<div class="betterrelated"><p><strong>Related content:</strong></p>
<ol><li> <a href="http://www.dotnetthoughts.net/2011/12/26/how-to-configure-a-wcf-service-to-use-port-sharing/" title="Permanent link to How to configure a WCF service to use Port Sharing">How to configure a WCF service to use Port Sharing</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/06/24/wcf-callbacks-%e2%80%93-a-quick-introduction/" title="Permanent link to WCF Callbacks – A quick introduction">WCF Callbacks – A quick introduction</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/03/20/how-to-create-restful-wcf-services/" title="Permanent link to How to create RESTful WCF services">How to create RESTful WCF services</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/04/01/how-to-post-data-to-restful-wcf-service/" title="Permanent link to How to post data to RESTful WCF service">How to post data to RESTful WCF service</a>  </li>
</ol></div>]]></content:encoded>
			<wfw:commentRss>http://www.dotnetthoughts.net/2012/01/22/how-to-add-mex-endpoints-programmatically/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to configure a WCF service to use Port Sharing</title>
		<link>http://www.dotnetthoughts.net/2011/12/26/how-to-configure-a-wcf-service-to-use-port-sharing/</link>
		<comments>http://www.dotnetthoughts.net/2011/12/26/how-to-configure-a-wcf-service-to-use-port-sharing/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 02:46:15 +0000</pubDate>
		<dc:creator>Anuraj P</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[.Net 3.0 / 3.5]]></category>
		<category><![CDATA[.Net 4.0]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[C#.Net]]></category>
		<category><![CDATA[Port Sharing]]></category>
		<category><![CDATA[WCF Port sharing]]></category>

		<guid isPermaLink="false">http://www.dotnetthoughts.net/?p=2162</guid>
		<description><![CDATA[Windows Communication Foundation (WCF) provides a new TCP-based network protocol (net.tcp://) for high-performance communication. WCF also introduces a new system component, the Net.TCP Port Sharing Service that enables net.tcp ports to be shared across multiple user processes. Yesterday I got &#8230; <a href="http://www.dotnetthoughts.net/2011/12/26/how-to-configure-a-wcf-service-to-use-port-sharing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Windows Communication Foundation (WCF) provides a new TCP-based network protocol (net.tcp://) for high-performance communication. WCF also introduces a new system component, the Net.TCP Port Sharing Service that enables net.tcp ports to be shared across multiple user processes. Yesterday I got a chance to work on the same, I thought it was complex. But it is very simple in WCF, only we need to modify the <strong>PortSharingEnabled</strong> property of the NetTcpBinding. Like the following</p>
<pre class="brush: csharp; title: ; notranslate">
string baseAddress = &quot;net.tcp://localhost:8080/MyService1&quot;;
Uri[] addresses = { new Uri(baseAddress) };
using (var serviceHost = new ServiceHost(typeof(Service), addresses))
{
    var nettcpbinding = new NetTcpBinding();
    nettcpbinding.PortSharingEnabled = true;
    serviceHost.AddServiceEndpoint(typeof(IService),
        nettcpbinding, &quot;IService&quot;);

    serviceHost.Open();
    Console.ReadKey(true);
    serviceHost.Close();
}
</pre>
<p style="text-align: justify;">Also even if set the PortSharingEnabled to true, we also require to start the <strong>Net.Tcp port sharing service</strong> from the control panel. By default it will be disabled. If the service not started, and your tried to listen two services in same port number, you may get an exception like this <em>AddressAlreadyInUseException &#8211; There is already a listener on IP endpoint 0.0.0.0:8080. This could happen if there is another application already listening on this endpoint or if you have multiple service endpoints in your service host with the same IP endpoint but with incompatible binding configurations</em>.</p>
<div id="attachment_2168" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.dotnetthoughts.net/2011/12/26/how-to-configure-a-wcf-service-to-use-port-sharing/dotnetthoughts_services/" rel="attachment wp-att-2168"><img class="size-medium wp-image-2168" title="Net.Tcp port sharing service in Services console." src="http://www.dotnetthoughts.net/wp-content/uploads/2011/12/dotnetthoughts_services-300x144.jpg" alt="Net.Tcp port sharing service in Services console." width="300" height="144" /></a><p class="wp-caption-text">Net.Tcp port sharing service in Services console.</p></div>
<p>You can also set the property via App.Config file also.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;bindings&gt;
    &lt;netTcpBinding&gt;
        &lt;binding portSharingEnabled=&quot;true&quot; /&gt;
    &lt;/netTcpBinding&gt;
&lt;/bindings&gt;
</pre>
<p>Now you are able to run two services with same port number, in this port number 8080.</p>
<p>Happy Programming <img src='http://www.dotnetthoughts.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="betterrelated"><p><strong>Related content:</strong></p>
<ol><li> <a href="http://www.dotnetthoughts.net/2011/06/24/wcf-callbacks-%e2%80%93-a-quick-introduction/" title="Permanent link to WCF Callbacks – A quick introduction">WCF Callbacks – A quick introduction</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/03/20/how-to-create-restful-wcf-services/" title="Permanent link to How to create RESTful WCF services">How to create RESTful WCF services</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2012/01/22/how-to-add-mex-endpoints-programmatically/" title="Permanent link to How to add MEX endpoints programmatically">How to add MEX endpoints programmatically</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/11/18/how-to-create-a-rss-feed-using-asp-net/" title="Permanent link to How to create a RSS feed using ASP.Net">How to create a RSS feed using ASP.Net</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2010/11/25/raven-db-introduction/" title="Permanent link to Raven DB &#8211; Introduction">Raven DB &#8211; Introduction</a>  </li>
</ol></div>]]></content:encoded>
			<wfw:commentRss>http://www.dotnetthoughts.net/2011/12/26/how-to-configure-a-wcf-service-to-use-port-sharing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Upload multiple files using Silverlight</title>
		<link>http://www.dotnetthoughts.net/2011/07/17/upload-multiple-files-using-silverlight/</link>
		<comments>http://www.dotnetthoughts.net/2011/07/17/upload-multiple-files-using-silverlight/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 10:45:54 +0000</pubDate>
		<dc:creator>Anuraj P</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[.Net 3.0 / 3.5]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[.Net 4.0]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C#.Net]]></category>
		<category><![CDATA[Upload Multiple Files]]></category>

		<guid isPermaLink="false">http://www.dotnetthoughts.net/?p=1764</guid>
		<description><![CDATA[Early this year I wrote a post about creating a File Uploader using Silverlight and WCF. And today I got a question from one forum, about to create uploader for multiple files. And here is source code, I am just &#8230; <a href="http://www.dotnetthoughts.net/2011/07/17/upload-multiple-files-using-silverlight/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Early this year I wrote a post about creating a <a href="http://www.dotnetthoughts.net/2010/01/06/file-uploader-using-silverlight-and-wcf/">File Uploader using Silverlight and WCF</a>. And today I got a question from one forum, about to create uploader for multiple files. And here is source code, I am just modified my eariler source code slightly to select multiple file.</p>
<pre class="brush: csharp; title: ; notranslate">
OpenFileDialog openFileDialog = new OpenFileDialog();
//Hard coding filter - You can read it from client side too.
openFileDialog.Filter = &quot;Image Files|*.jpg;*.bmp;*.png&quot;;
openFileDialog.Multiselect = true;
bool? result = openFileDialog.ShowDialog();
if (result.HasValue &amp;&amp; result.Value)
{
    spProgress.Visibility = System.Windows.Visibility.Visible;

    Service1Client client = new Service1Client();
    client.DoUploadCompleted += (o, p) =&gt;
    {
        if (p.Error != null)
        {
            MessageBox.Show(p.Error.Message);
        }
        else
        {
            MessageBox.Show(&quot;Done&quot;);
        }
    };
    client.DoUploadAsync(CreateUploadData(openFileDialog.Files));
    client.CloseAsync();
}
</pre>
<p>And here is the helper methods.</p>
<pre class="brush: csharp; title: ; notranslate">
private Dictionary&lt;string, byte[]&gt; CreateUploadData(IEnumerable&lt;FileInfo&gt; infos)
{
    var files = new Dictionary&lt;string, byte[]&gt;();
    foreach (var fileInfo in infos)
    {
        files.Add(fileInfo.Name, ReadFileContents(fileInfo.OpenRead()));
    }

    return files;
}

private byte[] ReadFileContents(Stream stream)
{
    using (Stream sr = stream)
    {
        byte[] contents = new byte[sr.Length];
        sr.Read(contents, 0, contents.Length);
        return contents;
    }
}
</pre>
<p>And here is the change in WCF Service.</p>
<pre class="brush: csharp; title: ; notranslate">
[OperationContract]
public void DoUpload(Dictionary&lt;string, byte[]&gt; files)
{
    string folder = @&quot;C:\Uploads&quot;;
    foreach (var file in files)
    {
        using (FileStream sw = File.OpenWrite(Path.Combine(folder, file.Key)))
        {
            sw.Write(file.Value, 0, file.Value.Length);
        }
    }
    return;
}
</pre>
<p>Sometimes if you are uploading too many files with large size, you may get some error like Not Found, maxArrayLength exceeded. You can fix this error by addingin the web.config file.</p>
<div class="betterrelated"><p><strong>Related content:</strong></p>
<ol><li> <a href="http://www.dotnetthoughts.net/2010/01/06/file-uploader-using-silverlight-and-wcf/" title="Permanent link to File Uploader using Silverlight and WCF">File Uploader using Silverlight and WCF</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2009/07/28/uploading-files-using-webservice/" title="Permanent link to Uploading Files using Webservice">Uploading Files using Webservice</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2010/11/26/how-to-upload-file-using-httpwebrequest-class/" title="Permanent link to How to upload file using HttpWebRequest class">How to upload file using HttpWebRequest class</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2010/12/17/developing-a-simple-rss-reader-in-c-net/" title="Permanent link to Developing a simple RSS Reader in C#.Net">Developing a simple RSS Reader in C#.Net</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2008/05/24/select-folder-using-openfiledialog-control/" title="Permanent link to Select folder using OpenFileDialog control">Select folder using OpenFileDialog control</a>  </li>
</ol></div>]]></content:encoded>
			<wfw:commentRss>http://www.dotnetthoughts.net/2011/07/17/upload-multiple-files-using-silverlight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WCF Callbacks – A quick introduction</title>
		<link>http://www.dotnetthoughts.net/2011/06/24/wcf-callbacks-%e2%80%93-a-quick-introduction/</link>
		<comments>http://www.dotnetthoughts.net/2011/06/24/wcf-callbacks-%e2%80%93-a-quick-introduction/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 12:38:20 +0000</pubDate>
		<dc:creator>Anuraj P</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[.Net 4.0]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Callbacks]]></category>
		<category><![CDATA[Unit Testing]]></category>

		<guid isPermaLink="false">http://www.dotnetthoughts.net/?p=1701</guid>
		<description><![CDATA[WCF callbacks are an old topic, but recently I got a chance to play around it. WCF callback means instead of normal request – response pattern, it will be a bidirectional communication between client and server. First need to create &#8230; <a href="http://www.dotnetthoughts.net/2011/06/24/wcf-callbacks-%e2%80%93-a-quick-introduction/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>WCF callbacks are an old topic, but recently I got a chance to play around it. WCF callback means instead of normal request – response pattern, it will be a bidirectional communication between client and server. </p>
<p>First need to create the service interface</p>
<pre class="brush: csharp; title: ; notranslate">
[ServiceContract(CallbackContract = typeof(IServiceCallback),
Namespace = &quot;http://dotnetthoughts.net/wcf&quot;)]
interface IService
{
    [OperationContract(IsOneWay = true)]
    void SayHello(string name);
}
</pre>
<p>If you notice the Service contract attribute, there is parameter, Callback contract, which is required to map the service call with the callback method. And here is the callback contract interface.</p>
<pre class="brush: csharp; title: ; notranslate">
interface IServiceCallback
{
    [OperationContract(IsOneWay = true)]
    void Print(string message);
}
</pre>
<p>And here is the implementation of the service and callback interface.</p>
<pre class="brush: csharp; title: ; notranslate">
class Service : IService
{
    public void SayHello(string name)
    {
        IServiceCallback callback =
            OperationContext.Current.GetCallbackChannel&lt;IServiceCallback&gt;();
        string message = string.Format(&quot;Hello {0}&quot;, name);
        callback.Print(message);
    }
}

class ServiceCallback : IServiceCallback
{
    public void Print(string message)
    {
        Console.WriteLine(message);
    }
}
</pre>
<p>I am using Self Hosting mode to host the service. And here is the implementation.</p>
<pre class="brush: csharp; title: ; notranslate">
class Program
{
    static void Main(string[] args)
    {
        string baseAddress = &quot;net.tcp://localhost:8080/&quot;;
        Uri[] addresses = { new Uri(baseAddress) };
        using (var serviceHost = new ServiceHost(typeof(Service), addresses))
        {
            serviceHost.AddServiceEndpoint(typeof(IService),
                new NetTcpBinding(), &quot;IService&quot;);

            serviceHost.Open();
            Console.WriteLine(&quot;Service started.&quot;);
            Console.WriteLine(&quot;Press any key to stop.&quot;);
            Console.ReadKey(true);
            serviceHost.Close();
        }
    }
}
</pre>
<p>Now we need to create proxy to communicate to our service. Here is the proxy implementation.</p>
<pre class="brush: csharp; title: ; notranslate">
class ServiceProxy : DuplexClientBase&lt;IService&gt;, IService
{
    public ServiceProxy(object callbackInstance,
        Binding binding, EndpointAddress remoteAddress)
        : base(callbackInstance, binding, remoteAddress)
    {

    }
    public void SayHello(string name)
    {
        Channel.SayHello(name);
    }
}
</pre>
<p>And finally here is the client implementation, in the client class; I am implementing the callback interface, so that I can get the callback result in the client.</p>
<pre class="brush: csharp; title: ; notranslate">
class Client : IServiceCallback
{
    public void SayHelloToService(string name)
    {
        var proxy =
            new ServiceProxy(this, new NetTcpBinding(),
                new EndpointAddress(&quot;net.tcp://localhost:8080/IService&quot;));
        proxy.SayHello(name);
    }

    public void Print(string message)
    {
        Console.WriteLine(message);
    }
}
</pre>
<p>Now start the Service first then create the instance of client class and invoke SayHelloToService with name parameter and it will be printed in the console. And here is the Test for the same.</p>
<pre class="brush: csharp; title: ; notranslate">

[TestClass]
public class TestService : IServiceCallback
{
    private string actual = string.Empty;
    private AutoResetEvent autoResetEvent = null;
    [TestMethod]
    public void TestSayHello()
    {
        string expected = &quot;Hello dotnetthoughts&quot;;
        autoResetEvent = new AutoResetEvent(false);
        var proxy =
            new ServiceProxy(this, new NetTcpBinding(),
                new EndpointAddress(&quot;net.tcp://localhost:8080/IService&quot;));
        proxy.SayHello(&quot;dotnetthoughts&quot;);
        Assert.IsTrue(autoResetEvent.WaitOne(5000), @&quot;Callback not recevied.&quot;);
        Assert.IsTrue(expected == actual, @&quot;Invalid response from callback.&quot;);
    }

    public void Print(string message)
    {
        actual = message;
        autoResetEvent.Set();
    }
}
</pre>
<p>Happy Coding <img src='http://www.dotnetthoughts.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="betterrelated"><p><strong>Related content:</strong></p>
<ol><li> <a href="http://www.dotnetthoughts.net/2011/12/26/how-to-configure-a-wcf-service-to-use-port-sharing/" title="Permanent link to How to configure a WCF service to use Port Sharing">How to configure a WCF service to use Port Sharing</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/03/20/how-to-create-restful-wcf-services/" title="Permanent link to How to create RESTful WCF services">How to create RESTful WCF services</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2012/01/22/how-to-add-mex-endpoints-programmatically/" title="Permanent link to How to add MEX endpoints programmatically">How to add MEX endpoints programmatically</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/04/01/how-to-post-data-to-restful-wcf-service/" title="Permanent link to How to post data to RESTful WCF service">How to post data to RESTful WCF service</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/01/18/how-to-unit-test-asynchronous-callbacks/" title="Permanent link to How to unit test asynchronous callbacks">How to unit test asynchronous callbacks</a>  </li>
</ol></div>]]></content:encoded>
			<wfw:commentRss>http://www.dotnetthoughts.net/2011/06/24/wcf-callbacks-%e2%80%93-a-quick-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to post data to RESTful WCF service</title>
		<link>http://www.dotnetthoughts.net/2011/04/01/how-to-post-data-to-restful-wcf-service/</link>
		<comments>http://www.dotnetthoughts.net/2011/04/01/how-to-post-data-to-restful-wcf-service/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 14:29:01 +0000</pubDate>
		<dc:creator>Anuraj P</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[.Net 4.0]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[RESTful service]]></category>

		<guid isPermaLink="false">http://www.dotnetthoughts.net/?p=1599</guid>
		<description><![CDATA[Last post I wrote about getting data from RESTful service. And this post is about uploading / posting data to a RESTful service. In this I am modifying the same interface, and adding a method which accepts a stream parameter, &#8230; <a href="http://www.dotnetthoughts.net/2011/04/01/how-to-post-data-to-restful-wcf-service/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last post I wrote about getting data from RESTful service. And this post is about uploading / posting data to a RESTful service. In this I am modifying the same interface, and adding a method which accepts a stream parameter, for getting the data in the service side.</p>
<pre class="brush: csharp; title: ; notranslate">
[OperationContract]
[WebInvoke(Method = &quot;POST&quot;, UriTemplate = &quot;update&quot;)]
void UpdateTime(Stream data);
</pre>
<p>And in the implementation side, I am display the contents to Service host window.</p>
<pre class="brush: csharp; title: ; notranslate">
public void UpdateTime(Stream data)
{
    using (var sr = new StreamReader(data))
    {
        Console.WriteLine(sr.ReadToEnd());
    }
}
</pre>
<p>And the I am using this code to <a href="http://www.dotnetthoughts.net/2009/11/10/post-data-using-httpwebrequest-in-c-sharp/">POST DATA USING HTTPWEBREQUEST IN C# </a>to send data to the service.</p>
<div class="betterrelated"><p><strong>Related content:</strong></p>
<ol><li> <a href="http://www.dotnetthoughts.net/2011/03/20/how-to-create-restful-wcf-services/" title="Permanent link to How to create RESTful WCF services">How to create RESTful WCF services</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/06/24/wcf-callbacks-%e2%80%93-a-quick-introduction/" title="Permanent link to WCF Callbacks – A quick introduction">WCF Callbacks – A quick introduction</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2009/11/10/post-data-using-httpwebrequest-in-c-sharp/" title="Permanent link to Post data using HttpWebRequest in C#">Post data using HttpWebRequest in C#</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/12/26/how-to-configure-a-wcf-service-to-use-port-sharing/" title="Permanent link to How to configure a WCF service to use Port Sharing">How to configure a WCF service to use Port Sharing</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2012/01/22/how-to-add-mex-endpoints-programmatically/" title="Permanent link to How to add MEX endpoints programmatically">How to add MEX endpoints programmatically</a>  </li>
</ol></div>]]></content:encoded>
			<wfw:commentRss>http://www.dotnetthoughts.net/2011/04/01/how-to-post-data-to-restful-wcf-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

