Lina Lina - 8 months ago 30
C# Question

WCF service with protocol buffer, how the config file will look like

I worked on WCF before. But very new in protocol buffers. I went through its advantages and how to use it. Basically i want to plug in the protocol buffers into my existing 'WCF library'. So what changes should i make in my existing 'app.config' file to introduce or start working with protocol buffers?
My existing service Config file is as follows.

<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
<compilation debug="true" />
<membership defaultProvider="XYZProvider">
<add name="XYZshipProvider" type="System.Web.ClientServices.Providers.XYZProvider, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf35678563123ad364e35" serviceUri="" />
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856564ad364e35" serviceUri="" cacheTimeout="86400" />
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<service name="wcfServiceXYZApplication.Service1">
<add baseAddress="http://localhost:8733/Design_Time_Addresses/XYZApplication/Service1/" />
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address="" binding="basicHttpBinding" contract="XYZApplication.IService1" bindingConfiguration="basicHttp">
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
<dns value="localhost" />
<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<!-- To avoid disclosing metadata information,
set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" />
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="False" />
<binding name="basicHttp" maxReceivedMessageSize="100000" maxBufferSize="100000" maxBufferPoolSize="100000"/>


Please help!

Answer Source

I used following artical to make changes in config file of client side and server side. Ver useful article , willing to share with you ...

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download