yes, I can handle this, you need to configure your web.config file so that it looks like
<?xml version="1.0" encoding="UTF-8"?>
<system.webServer> <validation validateIntegratedModeConfiguration="false" /> <modules runAllManagedModulesForAllRequests="true"> <add name="DomainServiceModule" preCondition="managedHandler" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </modules> <directoryBrowse enabled="false" /> </system.webServer> <system.web> <httpModules> <add name="DomainServiceModule" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </httpModules> <compilation debug="true" targetFramework="4.0"> <assemblies><add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </assemblies> </compilation> <httpRuntime executionTimeout="36000"/> </system.web> <system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> <bindings> <basicHttpBinding> <binding name="Sbinding" maxReceivedMessageSize="1500000000" maxBufferSize="1500000000"> <readerQuotas maxArrayLength="1500000000" maxStringContentLength="1500000000" /> </binding> </basicHttpBinding> <webHttpBinding> <binding name="Ubinding" maxBufferSize="1500000000" maxBufferPoolSize="1500000000" maxReceivedMessageSize="1500000000" transferMode="Streamed"> <readerQuotas maxStringContentLength="1500000000" maxArrayLength="1500000000" maxBytesPerRead="1500000000" maxNameTableCharCount="1500000000" /> </binding> </webHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="ClientUpload.Web.UploadService"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> <behavior name="ServiceBehaviour"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> <endpointBehaviors> <behavior name="web"> <webHttp /> </behavior> </endpointBehaviors> </behaviors> <services> <service behaviorConfiguration="ClientUpload.Web.UploadService" name="ClientUpload.Web.Services.UploadService"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="Sbinding" contract="ClientUpload.Web.Services.IUploadService"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> <service name="ClientUpload.Web.Services.RestService" behaviorConfiguration="ServiceBehaviour"> <endpoint address="Rest" binding="webHttpBinding" contract="ClientUpload.Web.Services.IService1" behaviorConfiguration="web" bindingConfiguration="Ubinding"> </endpoint> </service> </services> </system.serviceModel>
-> β
And your client file ServiceReferences.ClientConfig looks like
<configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="BasicHttpBinding_IUploadService" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <security mode="None" /> </binding> <binding name="BasicHttpBinding_IUploadService1" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <security mode="None" /> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://localhost:50503/Services/UploadService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IUploadService1" contract="ServiceReference.ClientUpload.Web.Services.UploadService.IUploadService" name="BasicHttpBinding_IUploadService1" /> <endpoint address="http://localhost:50503/Services/UploadService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IUploadService" contract="ServiceReference1.IUploadService" name="BasicHttpBinding_IUploadService" /> </client> </system.serviceModel>
source share