Uploading large file using rest service wcf through postman - wcf

I'm developing an website by .net mvc. I created an wcf service in my web project. I'm trying to upload file through this service. I'm not able to upload large file by this. My code is here. Please help me.
My Service Interface
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "AddDiscount", RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
Result AddDiscount([MessageParameter(Name = "data")] Stream data);
Here data receiving image and other parameters.
public Result AddDiscount(Stream data)
{
Result objResult = new Result();
TBL_DISCOUNT_MASTER objDiscount = new TBL_DISCOUNT_MASTER();
long? PostedDiscountId;
try
{
StreamReader reader = new StreamReader(data);
var str = reader.ReadToEnd();
objDiscount = JsonConvert.DeserializeObject<TBL_DISCOUNT_MASTER>(str);
Image dd = objCamel.byteArrayToImage(objDiscount.DISCOUNT_LOGO);
string FileName = string.Concat(PostedDiscountId, "_logo.jpg");
var path = Path.Combine(HostingEnvironment.MapPath("~/Content/Images/Discount"), FileName);
dd.Save(path);
dd = objCamel.byteArrayToImage(objDiscount.DISCOUNT_IMAGE);
FileName = string.Concat(PostedDiscountId, "_background.jpg");
path = Path.Combine(HostingEnvironment.MapPath("~/Content/Images/Discount"), FileName);
dd.Save(path);
dd = objQRCode.GetQRCode(PostedDiscountId.ToString()); ;
FileName = string.Concat(PostedDiscountId, "_qr.jpg");
path = Path.Combine(HostingEnvironment.MapPath("~/Content/Images/Discount"), FileName);
dd.Save(path);
objResult.SUCCESS = 1;
objResult.MESSAGE = "Thank you for adding a discount offer. Please wait for admin approval.";
return objResult;
}
catch (Exception ex)
{
objResult.SUCCESS = 2;
objResult.MESSAGE = "Failed - " + ex.Message;
return objResult;
}
}
My web.config
<bindings>
<basicHttpBinding>
<binding receiveTimeout="00:10:00" sendTimeout="00:10:00" name="httpsBinding" allowCookies="true" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647" transferMode="Streamed">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic" />
</security>
</binding>
<binding name="Default">
<security mode="Transport" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="Zahhab.Services.Service1" behaviorConfiguration="Default">
<endpoint address="ZahhabService" behaviorConfiguration="webBehavior" binding="webHttpBinding" contract="Zahhab.Services.IService1"/>
</service>
</services>

By default, WCF allows you to upload up to 29,3 MB file size. You can modify this by changing the following in web.config.
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="40960000" /> <!-- allow up to 40 mb -->
</requestFiltering>
</security>
</system.webServer>

Finally I found the solution. I've just added following section beside existing in my web.config file. The complete configuration is:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding receiveTimeout="00:10:00" sendTimeout="00:10:00" name="httpsBinding" allowCookies="true" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic" />
</security>
</binding>
</basicHttpBinding>
<webHttpBinding>
<binding transferMode="Streamed" name="webBinding" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="0" receiveTimeout="01:30:00" sendTimeout="01:30:00">
<readerQuotas maxDepth="2147483647" maxArrayLength="2147483647" maxStringContentLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</webHttpBinding>
</bindings>
<services>
<service name="my service name" behaviorConfiguration="Default">
<endpoint address="" behaviorConfiguration="webBehavior" binding="webHttpBinding" bindingConfiguration="webBinding" contract="my contract" />
</service>
</services>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" />
<behaviors>
<endpointBehaviors>
<behavior name="webBehavior">
<webHttp helpEnabled="true" />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="Default">
<serviceMetadata httpGetEnabled="true" />
</behavior>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>

Related

Upload greater than 8 MB streams through WCF Service

I'm trying to upload photo(attachment stream) through window service , using REST configuration (webHttpBinding), but I get this exception
here is the binding configuration I used (I tried all of them and the error still as it )
<webHttpBinding>
<binding name="maxRequest" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode ="Transport"></security>
</binding>
<binding name="maxRequestBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" >
<readerQuotas maxDepth="2000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode ="Transport">
</security>
</binding>
<binding name="BasicHttpBinding_IFileService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
transferMode="Buffered" useDefaultWebProxy="true"
>
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode ="Transport"></security>
</binding>
I had also tried the solution for IIS posted here
https://techcommunity.microsoft.com/t5/iis-support-blog/solution-for-request-entity-too-large-error/ba-p/501134
however, all of the above doesn't work.
here is my endpoint behavior
<endpointBehaviors>
<behavior name="rest">
<webHttp faultExceptionEnabled="true" helpEnabled="true"/>
<dataContractSerializer maxItemsInObjectGraph="1365536" />
</behavior>
</endpointBehaviors>
here is the contract
and For more information the image size is just 100KB.
WCF default transmission message size is 64KB, you need to use MaxReceivedMessageSize to set the transmission message size.
<system.serviceModel>
<services>
<service name="ConsoleApp1.RawDataService" behaviorConfiguration="ServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8012/ServiceModelSamples/service"/>
</baseAddresses>
</host>
<endpoint address=""
binding="webHttpBinding"
contract="ConsoleApp1.IReceiveData"
behaviorConfiguration="ESEndPointBehavior" bindingConfiguration="RestfullwebHttpBinding"/>
</service>
</services>
<bindings>
<webHttpBinding>
<binding name="RestfullwebHttpBinding" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" maxBufferSize="2147483647">
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="ESEndPointBehavior">
<webHttp helpEnabled="true"/>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata/>
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
You need to apply RestfullwebHttpBinding to the endpoint.
Feel free to let me know if the problem persists.

WCF Calling Error: The underlying connection was closed: The connection was closed unexpectedly

I have a really annoying problem regarding with WCF Services. I have a wcf service which has basichttpbindng.
The service is published to Azure Web App and timeout is set to 20 minutes. After 180 seconds I get the following error:
The underlying connection was closed: The connection was closed
unexpectedly
I have a method like following:
public ProcessResult TestErrorMessage()
{
try
{
System.Threading.Thread.Sleep(320000);
return new ProcessResult()
{
};
}
catch (Exception ex)
{
throw ex;
}
}
[OperationContract]
ProcessResult TestErrorMessage();
You can find both Config below.
Server Config:
<bindings>
<basicHttpBinding>
<binding name="basicBindingConfiguration" closeTimeout="00:20:00" openTimeout="00:20:00" receiveTimeout="00:20:00" sendTimeout="00:20:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<!--<security mode="None">-->
<security mode="Transport">
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="Tefal.WebService.Integration.DivaIntegration" behaviorConfiguration="customBehavior">
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicBindingConfiguration" contract="Tefal.WebService.Integration.IDivaIntegration" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="customBehavior">
<!--<serviceMetadata httpsGetEnabled="false" />-->
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
Cleint config:
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IDivaIntegration" closeTimeout="00:20:00"
openTimeout="00:20:00" receiveTimeout="00:20:00" sendTimeout="00:20:00"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
useDefaultWebProxy="true">
<security mode="Transport" />
</binding>
<binding name="BasicHttpBinding_IDivaIntegration1" receiveTimeout="00:20:00"
sendTimeout="00:20:00" maxBufferPoolSize="2147483647" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2000000" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="ClientBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</endpointBehaviors>
</behaviors>

The remote server returned an error: (413) Request Entity too Large WCF

I have a windows application to send image to server using WCF service. When I run my code and upload an image, WCF returns "The remote server returned an error: (413) Request Entity Too Large."
I have tried several ways from links but not solved.
The following is my WCF Config.
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation targetFramework="4.5.2" />
<httpRuntime maxRequestLength="2147483647" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="secureHttpBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text">
<readerQuotas maxDepth="2000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="Transport" />
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- 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" />
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
The following is app.config from Windows app.
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ILicencePhoto" maxBufferPoolSize="2147483647" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="Transport" />
</binding>
<binding name="BasicHttpBinding_IUserLogging" >
<security mode="Transport" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://xxxxx/wcf/image.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ILicencePhoto"
contract="LicencePhoto.ILicencePhoto" name="BasicHttpBinding_ILicencePhoto" />
<endpoint address="https://xxxxx/wcf/user.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IUserLogging" contract="UserLogging.IUserLogging"
name="BasicHttpBinding_IUserLogging" />
</client>
</system.serviceModel>
I can log in with calling userWCF. The problem is when uploading user photo to WCF services. The user photo file size is only about 500KB max.
Thanks.
Nyi Nyi Aung
The main problem is that we don’t apply the configuration on the server-side. Since the server-side uses ProtocolMapping feature to enable the service works over HTTPS protocol, we should modify and apply the configuration on the BasicHttpsBinding instead of the BasicHttpBinding.
Please refer to the below configuration(Server-side).
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="secureHttpBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text">
<readerQuotas maxDepth="2000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="Transport" />
</binding>
</basicHttpBinding>
<basicHttpsBinding>
<binding name="httpsBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text">
<readerQuotas maxDepth="2000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="Transport" />
</binding>
</basicHttpsBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" bindingConfiguration="httpsBinding"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
Feel free to let me know if the problem still exists.

Max read depth issue when sending objects to WCF service

I am getting the below exception while sending objects to the WCF service, could anyone help me out to resolve this issue.
Exception:
The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:xxxx(class object). The InnerException message was 'There was an error deserializing the object of xxxxx.xx.xxx.xxxx(class). The maximum read depth (200) has been exceeded because XML data being read has more levels of nesting than is allowed by the quota. This quota may be increased by changing the MaxDepth property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 2, position 59349.'. Please see InnerException for more details.
Inner Exception:
The maximum read depth (200) has been exceeded because XML data being read has more levels of nesting than is allowed by the quota. This quota may be increased by changing the MaxDepth property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 2, position 59349.
I have tried by setting the below readerQuotas in bindings both in client and server
<readerQuotas maxDepth="200" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
My Service Configuration:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="mexBehavior">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
<dataContractSerializer maxItemsInObjectGraph="2147483646"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
<bindings>
<basicHttpBinding>
<binding name="secureHttpBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="200" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None">
<transport clientCredentialType="None"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="mexBehavior" name="Service">
<endpoint address="Service" binding="basicHttpBinding" bindingConfiguration="secureHttpBinding" contract="IService"/>
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/Service"/>
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
My Client Configuration:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:10:00" sendTimeout="00:05:00" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="200" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:50259/Service.svc/Service"
behaviorConfiguration="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService"
contract="IService" name="BasicHttpBinding_IService" />
</client>
</system.serviceModel>
Also, I have added maxRequestLength in httpRuntime both in client and service config
<system.web>
<httpRuntime targetFramework="4.6" maxRequestLength="2147483646"/>
</system.web>

Use wshttpBinding with SSL and wsHttpBinding without SSL in single service

I want to use wshttpbinding (with SSL and without SSL) in single service but it not works, anybody had implemented it. So please guide how can i achieve that?
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="CommonBehaviour">
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<serviceCredentials>
<serviceCertificate findValue="AzilenTechnology" x509FindType="FindBySubjectName" />
</serviceCredentials>
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBindingConfig" closeTimeout="00:10:00"
openTimeout="00:10:00" sendTimeout="00:10:00" maxBufferSize="2147483647"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Mtom">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
<wsHttpBinding>
<binding name="wsHttpBindingConfig" closeTimeout="00:10:00" openTimeout="00:10:00"
sendTimeout="00:10:00" bypassProxyOnLocal="true" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647" messageEncoding="Mtom">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None" />
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="CommonBehaviour" name="wcfAllInOne.wcfFileIO">
<endpoint binding="mexHttpBinding" bindingConfiguration="" contract="IMetadataExchange" />
<endpoint address="http://localhost:82/WCFAllInOne/wcfFileIO.svc/basicHttpEndPoint" binding="basicHttpBinding"
bindingConfiguration="basicHttpBindingConfig" name="BasicHttp"
contract="wcfAllInOne.IwcfFileIO" />
<endpoint address="http://localhost:82/WCFAllInOne/wcfFileIO.svc/wsHttpBindingEndPoint" binding="wsHttpBinding"
bindingConfiguration="wsHttpBindingConfig" name="wsHttp" contract="wcfAllInOne.IwcfFileIO" />
<endpoint address="https://localhost:444/WCFAllInOne/wcfFileIO.svc/wsHttpSslEndPoint" binding="wsHttpBinding"
bindingConfiguration="wsHttpBindingConfig" name="wsHttpSsl"
contract="wcfAllInOne.IwcfFileIO" />
<endpoint binding="mexHttpsBinding" bindingConfiguration="" contract="IMetadataExchange" />
</service>
</services>
I found the solution, why my last configuration doesn't work,
My first mistake is that i used same configuration for wsHttpBinding with ssl and wsHttpBinding Without SSL
Here in my config file,i had just created only one "wsHttpBindingConfig" for both endpoint (one has http address and another one has https address),
Now i am using two different configuration for to solve this problem.
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="CommonBehaviour">
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<serviceCredentials>
<serviceCertificate findValue="AzilenTechnologies" x509FindType="FindBySubjectName" />
</serviceCredentials>
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBindingConfig" closeTimeout="00:10:00"
openTimeout="00:10:00" sendTimeout="00:10:00" maxBufferSize="2147483647"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Mtom">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security>
<transport>
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>
</security>
</binding>
</basicHttpBinding>
<wsHttpBinding>
<binding name="wsHttpsBindingConfig" closeTimeout="00:10:00"
openTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="true"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Mtom">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="Transport">
<transport clientCredentialType="None">
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>
</security>
</binding>
<binding name="wsHttpBindingConfig" closeTimeout="00:10:00" openTimeout="00:10:00"
sendTimeout="00:10:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Mtom">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security>
<transport>
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="CommonBehaviour" name="wcfAllInOne.wcfFileIO">
<endpoint binding="mexHttpBinding" bindingConfiguration="" contract="IMetadataExchange" />
<endpoint address="/basicHTTPEndPoint" binding="basicHttpBinding"
bindingConfiguration="basicHttpBindingConfig" name="basicHttp"
contract="wcfAllInOne.IwcfFileIO" />
<endpoint address="/wsHTTPEndPoint" binding="wsHttpBinding" bindingConfiguration="wsHttpBindingConfig"
name="wsHttp" contract="wcfAllInOne.IwcfFileIO" />
<endpoint address="/wsHTTPSEndPoint" binding="wsHttpBinding"
bindingConfiguration="wsHttpsBindingConfig" name="wsHttpSsl"
contract="wcfAllInOne.IwcfFileIO" />
<endpoint binding="mexHttpsBinding" bindingConfiguration="" contract="IMetadataExchange" />
</service>
</services>