Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / DevOps / TFS

TFS Project creation error

0.00/5 (No votes)
24 Oct 2012CPOL 4.2K  
Error while creating a TFS project.

Introduction

While creating a project in TFS some times people get the below error.

"Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."

TFS ERROR

TFS ERROR

Background

This error occurs because of insufficient cache size, you can add below code snippets in webconfig file to avoid this error. Basically using this code you can increase the cache size, e,g., maxdatasize="1024".

Code snippet:

XML
<system.diagnostics>
    <sources>
      <source name="System.Net" tracemode="includehex" maxdatasize="1024">
        <listeners>
          <add name="System.Net"/>
        </listeners>
      </source>
      <source name="System.Net.Sockets">
        <listeners>
          <add name="System.Net"/>
        </listeners>
      </source>
      <source name="System.Net.Cache">
        <listeners>
          <add name="System.Net"/>
        </listeners>
      </source>
    </sources>
    <switches>
      <add name="System.Net" value="Verbose"/>
      <add name="System.Net.Sockets" value="Verbose"/>
      <add name="System.Net.Cache" value="Verbose"/>
    </switches>
    <sharedListeners>
      <add name="System.Net"
        type="System.Diagnostics.TextWriterTraceListener"
        initializeData="network.log"
      />
    </sharedListeners>
    <trace autoflush="true"/>
</system.diagnostics>

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)