none
service endpoint binding not using the HTTP protocol?

    Question

  • Hi,

     

    I had a WCF service hosted/working plus a application to connecting to it. I moved the WCF to Windows Server 2003 SP1 computer, and according to the admin its running IIS 6.0, it could be IIS 5.0, not 100% sure.

     

    And I get this error when trying to connect with my test application.

     

     

    System.ServiceModel.CommunicationException was unhandled
      Message="An error occurred while receiving the HTTP response to http://blabla:8843/Service.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details."
      Source="mscorlib"
      StackTrace:
        Server stack trace:
           at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)
           at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout)
           at System.ServiceModel.Security.TlsnegoTokenProvider.OnOpen(TimeSpan timeout)
           at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
           at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
           at System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout)
           at System.ServiceModel.Security.SecurityUtils.OpenCommunicationObject(ICommunicationObject obj, TimeSpan timeout)
           at System.ServiceModel.Security.SecurityUtils.OpenTokenProviderIfRequired(SecurityTokenProvider tokenProvider, TimeSpan timeout)
           at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout)
           at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
           at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
           at System.ServiceModel.Security.SecurityProtocol.Open(TimeSpan timeout)
           at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout)
           at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
           at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout)
           at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan timeout)
           at System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout)
           at System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout)
           at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
           at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
           at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
        Exception rethrown at [0]:
           at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
           at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
           at System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
           at System.ServiceModel.ClientBase`1.System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
           at System.ServiceModel.ClientBase`1.Open()
           at ConsoleApplication1.Program.Main(String[] args) in C:\Users\timo\Documents\Visual Studio 2008\Projects\TestNewService\TestNewService\Program.cs:line 39
           at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
           at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()
      InnerException: System.Net.WebException
           Message="The underlying connection was closed: An unexpected error occurred on a receive."
           Source="System"
           StackTrace:
                at System.Net.HttpWebRequest.GetResponse()
                at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
           InnerException: System.IO.IOException
                Message="Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."
                Source="System"
                StackTrace:
                     at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
                     at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
                     at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
                InnerException: System.Net.Sockets.SocketException
                     Message="An existing connection was forcibly closed by the remote host"
                     Source="System"
                     ErrorCode=10054
                     NativeErrorCode=10054
                     StackTrace:
                          at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
                          at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
                     InnerException:

    ---------------------------------------------------------------

     

     

    This is my endpoints on the application:

        <bindings>
          <wsHttpBinding>
            <binding name="WSHttpBinding_IService" closeTimeout="00:10:00"
                openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
                bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                allowCookies="false">
              <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                  maxBytesPerRead="4096" maxNameTableCharCount="16384" />
              <reliableSession ordered="true" inactivityTimeout="00:10:00"
                  enabled="false" />
              <security mode="Message">
                <transport clientCredentialType="Windows" proxyCredentialType="None"
                    realm="" />
                <message clientCredentialType="UserName" negotiateServiceCredential="true"
                    algorithmSuite="Default" establishSecurityContext="true" />
              </security>
            </binding>
          </wsHttpBinding>
        </bindings>

     <endpoint address="http://blabla:8843/Service.svc"
              binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService"
              contract="IService" name="WSHttpBinding_IService">

            <identity>
              <certificate encodedValue=blablaenc

          </identity>

    </endpoint>

     

    And end point on the service

     

    <bindings>
          <wsHttpBinding>
            <binding name="mySecureBinding">
              <security mode="Message">
                <message clientCredentialType="UserName" />
              </security>
            </binding>
          </wsHttpBinding>
        </bindings>   
      <services>
       <service name="Service" behaviorConfiguration="defaultProfile">
        <!-- Service Endpoints -->
        <endpoint address="" binding="wsHttpBinding"  bindingConfiguration="mySecureBinding" contract="IService">
         <identity>
          <dns value="blabla:8843"/>
         </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
       </service>
      </services>

     

    Any idea what is wrong with my endpoints or is the issue somewhere else?

     

    Thank you

    Monday, August 18, 2008 3:10 PM

All replies

  • This is likely due to an error at the server side (This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). Can you enable tracing (http://msdn2.microsoft.com/en-us/library/ms733025.aspx) at the server side to see if there is an error in that location that would explain this?

    Monday, August 18, 2008 7:25 PM
  • I am suspecting the reason for this exception is your Service's "negotiateServiceCredential="true" value. Of course you didn't specify this but it's the default behavior for Message security. Can you please add "negotiateServiceCredential="false" to your service config as I have shown below.   

     

     <binding name="mySecureBinding">
              <security mode="Message">
                <message clientCredentialType="UserName" negotiateServiceCredential="false" />
              </security>

    </binding>

     

    Having the default "negotiateServiceCredential=true" makes the service to present the correct token even before any messages are exchanged. But here you have a service which is authenticating it self to the client by a certificate and the client in turn is authenticating it self to the service by a "username". But this process should happen when the communication starts.

     

    This is my guess, please try by adding the config section that I mentioned above and regenerate the proxy for the client and test. Let me know if you still get the exception after trying this.

     

    Thanks.   


    Tuesday, August 19, 2008 12:57 AM
  • Hi actually my problem seems to be following, or thats what i think is wrong.

     

    The service is running in ssl.  so to view it in browser I have to use https://blabla:8843/service.svc

     

    But the app config the svcutil creates from svcutil https://blabla:8843/service.svc?wsdl  puts http://blabla:8844/service.svc in the endpoint. But it is not accesible from 8844 with http, or at least from the browser. And i cannot put https there with 8843 as it only allows me to put http.

     

    Also what is a good way to attach trace logs here as they are large?

     

     

     

    Tuesday, August 19, 2008 3:16 PM
  • You have a behavior config section in your service config file with name "defaultProfile".

    Try by adding httpsGetEnabled="true" as shown below. It's "HTTPS" not "HTTP".

     

    <serviceBehaviors>

    <behavior name="defaultProfile">

    <serviceDebug includeExceptionDetailInFaults="True"/>

    <serviceMetadata httpsGetEnabled="true" />

    </behavior>

    </serviceBehaviors>

     

    You have to have Transport security for "https" but I don't see that in your service config file.

     

    Thanks.

     

     

    Tuesday, August 19, 2008 5:47 PM
  • actually, I already have that. Added that so I could create the config file with svcutil through https

     

    Here is my full service web.config file

     

     

    <?xml version="1.0"?>
    <!--
        Note: As an alternative to hand editing this file you can use the
        web admin tool to configure settings for your application. Use
        the Website->Asp.Net Configuration option in Visual Studio.
        A full list of settings and comments can be found in
        machine.config.comments usually located in
        \Windows\Microsoft.Net\Framework\v2.x\Config
    -->
    <configuration>
     <configSections>
      <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
       <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
         <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
         <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
         <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
         <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
        </sectionGroup>
       </sectionGroup>
      </sectionGroup>
     </configSections>
     <appSettings/>
     <connectionStrings/>
     <system.web>
      <!--
                Set compilation debug="true" to insert debugging
                symbols into the compiled page. Because this
                affects performance, set this value to true only
                during development.
            -->
      <compilation debug="true">
       <assemblies>
        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="MySql.Data, Version=5.1.6.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/></assemblies>
      </compilation>
      <!--
                The <authentication> section enables configuration
                of the security authentication mode used by
                ASP.NET to identify an incoming user.
            -->
      <authentication mode="Windows"/>
      <!--
                The <customErrors> section enables configuration
                of what to do if/when an unhandled error occurs
                during the execution of a request. Specifically,
                it enables developers to configure html error pages
                to be displayed in place of a error stack trace.

            <customErrors>
                <mode="Off"/>
            </customErrors>
            -->
      <pages>
       <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
       </controls>
      </pages>
      <httpHandlers>
       <remove verb="*" path="*.asmx"/>
       <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
       <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
       <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
      </httpHandlers>
      <httpModules>
       <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </httpModules>
     </system.web>
     <system.codedom>
      <compilers>
       <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
        <providerOption name="CompilerVersion" value="v3.5"/>
        <providerOption name="WarnAsError" value="false"/>
       </compiler>
       <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
        <providerOption name="CompilerVersion" value="v3.5"/>
        <providerOption name="OptionInfer" value="true"/>
        <providerOption name="WarnAsError" value="false"/>
       </compiler>
      </compilers>
     </system.codedom>
     <system.web.extensions>
      <scripting>
       <webServices>
        <!--
                  Uncomment this section to enable the authentication service. Include
                  requireSSL="true" if appropriate.

              <authenticationService enabled="true" requireSSL = "true|false"/>
              -->
        <!--
                  Uncomment these lines to enable the profile service, and to choose the
                  profile properties that can be retrieved and modified in ASP.NET AJAX
                  applications.

               <profileService enabled="true"
                               readAccessProperties="propertyname1,propertyname2"
                               writeAccessProperties="propertyname1,propertyname2" />
              -->
        <!--
                  Uncomment this section to enable the role service.

              <roleService enabled="true"/>
              -->
       </webServices>
       <!--
            <scriptResourceHandler enableCompression="true" enableCaching="true" />
            -->
      </scripting>
     </system.web.extensions>
     <!--
            The system.webServer section is required for running ASP.NET AJAX under Internet
            Information Services 7.0.  It is not necessary for previous version of IIS.
        -->
     <system.webServer>
      <validation validateIntegratedModeConfiguration="false"/>
      <modules>
       <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </modules>
      <handlers>
       <remove name="WebServiceHandlerFactory-Integrated"/>
       <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
       <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
       <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </handlers>
     </system.webServer>


    <system.diagnostics>
      <sources>
        <source name="System.ServiceModel"
                switchValue="Information, ActivityTracing"
                propagateActivity="true" >
          <listeners>
            <add name="xml"/>
          </listeners>
        </source>
        <source name="System.ServiceModel.MessageLogging">
          <listeners>
            <add name="xml"/>
          </listeners>
        </source>
        <source name="myUserTraceSource"
                switchValue="Information, ActivityTracing">
          <listeners>
            <add name="xml"/>
          </listeners>
        </source>
      </sources>
      <sharedListeners>
        <add name="xml"
             type="System.Diagnostics.XmlWriterTraceListener"
                   initializeData="C:\logs\Traces23.svclog" />
      </sharedListeners>
     </system.diagnostics>

     


     <system.serviceModel>

      <diagnostics wmiProviderEnabled="true">
          <messageLogging
               logEntireMessage="true"
               logMalformedMessages="true"
               logMessagesAtServiceLevel="true"
               logMessagesAtTransportLevel="false"
               maxMessagesToLog="3000"
           />
      </diagnostics>


        <bindings>
          <wsHttpBinding>
            <binding name="mySecureBinding">
              <security mode="Message">
                <message clientCredentialType="UserName" />
              </security>
            </binding>
          </wsHttpBinding>
        </bindings>   
      <services>
       <service name="Service" behaviorConfiguration="defaultProfile">
        <!-- Service Endpoints -->
        <endpoint address="" binding="wsHttpBinding"  bindingConfiguration="mySecureBinding" contract="IService">
         <!--
                  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
                  automatically.
              -->

        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
       </service>
      </services>
      <behaviors>
       <serviceBehaviors>
            <behavior name="defaultProfile">
              <serviceCredentials>
                <serviceCertificate findValue="blabla" x509FindType="FindBySubjectName" storeLocation="LocalMachine" storeName="My" />
                <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="UsernameValidator, App_Code" />
              </serviceCredentials>
              <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above 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="true"/>         
            </behavior>       
       </serviceBehaviors>
      </behaviors>
     </system.serviceModel>


     
     
    </configuration>

    Tuesday, August 19, 2008 9:10 PM
  • I´m having the same problem but when I consult the svclog thru svcTraceViewer the error is:
    A trace size quota was exceeded. The trace was truncated.
    Any ideas?
    thanks;


    paburgos
    Tuesday, December 30, 2008 2:34 AM
  • I am not sure if this is related to this thread - but this is the first post that comes up when I search for my issue so I am going to add my solution here and hope it helps somebody else.

    I have a WCF service that accepts a binary array of a file. When a large file was uploaded I was getting the error
    "An error occurred while receiving the HTTP response to  This could be due to the service endpoint binding not using the HTTP protocol"

    The issue turned out to be the maxRequestLength in the web.config needed to be set to a larger numbers (the default is 4K). I added  <httpRuntime maxRequestLength="8192"/> and it solved the problem.

    • Proposed as answer by MattHunt1984 Thursday, August 27, 2009 2:14 PM
    Tuesday, February 17, 2009 6:36 PM
  • Hi jeff1042

    Can u put your web.config file here.

    I am not getting where to put <httpRuntime maxRequestLength="8192"/>

    plz reply.
    Monday, September 14, 2009 5:25 AM
  • Hey Davy123, It goes in the in the System.Web block of the xml. Please see the following link for more information.

    Please note that the default size was actually previously incorrectly listed it is 4MB
    maxRequestLength     Indicates the maximum file upload size supported by ASP.NET. This limit can be used to prevent denial of service attacks caused by users posting large files to the server. The size specified is in kilobytes. The default is 4096 KB (4 MB).

    http://msdn.microsoft.com/en-us/library/e1f13641(VS.71).aspx

    --Nicolas
    Friday, November 27, 2009 2:50 AM
  • I got this error from calling a service contract method on my WCF service which returned a datacontract object. This datacontract object was a wrapper for the System.IO.DirectoryInfo class which contains a few members that are its own type partcularly the root member. My wrapper's root member would return a new instance of it's own type but with information regarding the root directory. Well the root directory's root is always itself so during serialization my object would keep returning a new instance of itself contianing root information because the root property as well as all the others were being serialized.

    My first issue was that it boiled down to a null object being referenced, then once I solved that, it turned into a stack overflow.

    The point is that neither there was no indication of a null reference nor the stack overflow in the exception data (even with the includeExceptionDetailInFaults flag set). I also found that I could step into the service code from the client as long as I broke on the line of code in the client which contained the reference to the service interface call, and then stepped into that code (F11).

    Isn't this fun?!

    Sunday, December 27, 2009 11:40 PM
  • I increased all the buffer and timeout values possible and could not get around this error until I found I had not declared the objects being returned from my methods, with the [DataContract] flag.

    [

    DataContract]
    public struct ReturnStruct
    {
      public ObjEntries[] entries;
      public String errorMessage;
    }

    ...

    [

    OperationContract]
    ReturnStruct GetMatches(String args);

     

    Monday, February 01, 2010 9:36 PM
  • My error is similar to yours.

    The WCF service return a subclass of a datacontract class, which cause the client can't resolve the returned value.

    I detect the problem by adding following trace lisenter in mysevicehost.exe.config:

    <system.diagnostics>
          <sources>
                <source name="System.ServiceModel"
                        switchValue="Information, ActivityTracing"
                        propagateActivity="true">
                <listeners>
                   <add name="traceListener"
                       type="System.Diagnostics.XmlWriterTraceListener"
                       initializeData= "c:\log\Traces.svclog" />
                </listeners>
             </source>
          </sources>
       </system.diagnostics>

    Friday, May 20, 2011 6:27 AM
  • Hi
    I have a similar problem with my service. I adjusted all possible timeouts and buffer sizes too, but nothing works. I get the same exception everytime!

    Here's a Thread that I started. What I'm trying to do is that my client request for the service to download and store those files on the blob. This works for small files, but when the file size exceeds and the service takes more than 1 minute, the client catches and exception. For the time I wait for the download to finish as I know how much time approx it will take to download in the finally block. But I really need to get the binding thing imroved. I'm using http binding and that's a requirement for me.

    Someone also suggested that I use http, but not sure if that's going to work for http

    Thanks in advance for help!


    RK

    Thursday, February 09, 2012 4:46 AM
  • Please can you tell me about (WCF) ..also i want to know Microsoft 2013.

    Waiting for your reply

    Thanks

    Denislara

    Fort Lauderdale Movers

    Wednesday, August 01, 2012 6:16 AM
  • I also used the above trace listener and to find my problem which was an "System.Runtime.Serialization.InvalidDataContractException" caused by one of my properties on the DataContract not having a Set method.

    I fixed the problem by adding empty internal set methods:

    [DataMember]
            public decimal Credits
            {
                get { return Items.Where(i => i.Credit != null).Sum(i => (decimal)i.Credit); }
                internal set { }
            }

    Friday, January 10, 2014 8:10 AM