Hi!
In one MS VS 2013 solution I develop two projects: 1) WCF service with duplex contract and 2) WPF Client for this service. When I try to add service reference to the client then the following error has place: "Contract requires Session, but baseHttpBinding doesn't support it or isn't configured properly to support it". When I change (in App.config file) from basicHttpBindin g to WSDualHttpBindi ng then I get the following error: "binding attribute not valid: WSDualHttpBindi ng value not valid...".
So how can I change from basicHttpBindin g to WSDualHttpBindi ng?
I display service's App.config file completely below:
Below I display contract interface:
And below I display calback interface:
In one MS VS 2013 solution I develop two projects: 1) WCF service with duplex contract and 2) WPF Client for this service. When I try to add service reference to the client then the following error has place: "Contract requires Session, but baseHttpBinding doesn't support it or isn't configured properly to support it". When I change (in App.config file) from basicHttpBindin g to WSDualHttpBindi ng then I get the following error: "binding attribute not valid: WSDualHttpBindi ng value not valid...".
So how can I change from basicHttpBindin g to WSDualHttpBindi ng?
I display service's App.config file completely below:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" />
</system.web>
<system.serviceModel>
<services>
<service name="DownloadManager.DownloadManagerService">
<endpoint address="" binding="basicHttpBinding" contract="DownloadManager.IDownloadManagerService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8733/Design_Time_Addresses/DownloadManager/DownloadManagerService/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Code:
[ServiceContract(Namespace="http://DownloadManager",SessionMode=SessionMode.Required,
CallbackContract=typeof(IDownloadManagerServiceCalback))]
public interface IDownloadManagerService
{
. . . . . . . .
}
Code:
public interface IDownloadManagerServiceCalback
{
[OperationContract(IsOneWay=true)]
void UpdateSelectedDownload(Downloader p_SelectedDownload);
}