<Type Name="WebResponse" FullName="System.Net.WebResponse" FullNameSP="System_Net_WebResponse" Maintainer="ecma">
  <TypeSignature Language="ILASM" Value=".class public abstract serializable WebResponse extends System.MarshalByRefObject implements System.IDisposable" />
  <TypeSignature Language="C#" Value="public abstract class WebResponse : MarshalByRefObject, IDisposable, System.Runtime.Serialization.ISerializable" />
  <MemberOfLibrary>Networking</MemberOfLibrary>
  <AssemblyInfo>
    <AssemblyName>System</AssemblyName>
    <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
    <AssemblyVersion>1.0.x.x</AssemblyVersion>
    <AssemblyVersion>1.0.5000.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
  <Base>
    <BaseTypeName>System.MarshalByRefObject</BaseTypeName>
  </Base>
  <Interfaces>
    <Interface>
      <InterfaceName>System.IDisposable</InterfaceName>
    </Interface>
    <Interface>
      <InterfaceName>System.Runtime.Serialization.ISerializable</InterfaceName>
    </Interface>
  </Interfaces>
  <Docs>
    <summary>
      <para>Represents a response received from a Uniform Resource Identifier
      (URI).</para>
    </summary>
    <remarks>
      <para>
        <see cref="T:System.Net.WebResponse" /> is the base
   class from which protocol-specific response classes, such as <see cref="T:System.Net.HttpWebResponse" />
   , are derived.</para>
      <para>Classes that derive from <see cref="T:System.Net.WebResponse" /> are required to
override the following members in the <see cref="T:System.Net.WebResponse" /> class: </para>
      <list type="bullet">
        <item>
          <term>
            <see cref="P:System.Net.WebResponse.ContentLength" />: Gets or sets the content length of 
      the data being received.</term>
        </item>
        <item>
          <term>
            <see cref="P:System.Net.WebResponse.ContentType" />: Gets or sets the media type of the 
      data being received.</term>
        </item>
        <item>
          <term>
            <see cref="M:System.Net.WebResponse.GetResponseStream" />: Returns a
   <see cref="T:System.IO.Stream" /> that contains data from 
      the current host.</term>
        </item>
        <item>
          <term>
            <see cref="P:System.Net.WebResponse.ResponseUri" />: Gets a <see cref="T:System.Uri" /> containing the URI of the resource associated with the 
      current instance.</term>
        </item>
        <item>
          <term>
            <see cref="P:System.Net.WebResponse.Headers" />:
      Gets or sets the collection of header name/value pairs associated with the
      current instance.</term>
        </item>
      </list>
      <block subset="none" type="note">
        <para> Applications can participate in request/response transactions in a
      protocol-agnostic manner using instances of the <see cref="T:System.Net.WebResponse" /> class while
      protocol-specific classes derived from <see cref="T:System.Net.WebResponse" />
      
      carry
      out the details of the
      request.</para>
        <para> Applications do not create <see cref="T:System.Net.WebResponse" />
objects directly; they are created by calling <see cref="M:System.Net.WebRequest.GetResponse" />
.</para>
      </block>
    </remarks>
    <example>
      <para>The following example creates a <see cref="T:System.Net.WebResponse" />
instance from a <see cref="T:System.Net.WebRequest" />
.</para>
      <code lang="C#">using System;
using System.Net;

public class WebResponseExample {

  public static void Main() {

    // Initialize the WebRequest.
    WebRequest myRequest =
      WebRequest.Create("http://www.contoso.com");

    // Return the response. 
    WebResponse myResponse = myRequest.GetResponse();

    // Code to use the WebResponse goes here.

    // Close the response to free resources.
    myResponse.Close();
  }
}
</code>
    </example>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="ILASM" Value="family rtspecialname specialname instance void .ctor()" />
      <MemberSignature Language="C#" Value="protected WebResponse ();" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters />
      <Docs>
        <summary>
          <para>Constructs a new
      instance of the <see cref="T:System.Net.WebResponse" />
      class.</para>
        </summary>
        <remarks>
          <para>This constructor is called only by classes that derive from <see cref="T:System.Net.WebResponse" />.</para>
          <para>
            <block subset="none" type="note">To obtain a <see cref="T:System.Net.WebResponse" /> instance, use the <see cref="M:System.Net.WebRequest.GetResponse" /> method; do not use this
constructor.</block>
          </para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="protected WebResponse (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);" />
      <MemberType>Constructor</MemberType>
      <Parameters>
        <Parameter Name="serializationInfo" Type="System.Runtime.Serialization.SerializationInfo" />
        <Parameter Name="streamingContext" Type="System.Runtime.Serialization.StreamingContext" />
      </Parameters>
      <Docs>
        <param name="serializationInfo">To be added.</param>
        <param name="streamingContext">To be added.</param>
        <summary>To be added.</summary>
        <remarks>To be added.</remarks>
      </Docs>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="Close">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual void Close()" />
      <MemberSignature Language="C#" Value="public virtual void Close ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para> Closes the response stream.</para>
        </summary>
        <remarks>
          <para>
            <block subset="none" type="behaviors">This method is
      required to free the connection used by the <see cref="T:System.IO.Stream" /> returned by a call to <see cref="M:System.Net.WebResponse.GetResponseStream" /> .</block>
          </para>
          <para>
            <block subset="none" type="default">The <see cref="T:System.Net.WebResponse" /> class is 
   abstract and does not provide an implementation for this method. This method
   throws <see cref="T:System.NotSupportedException" />.</block>
          </para>
          <para>
            <block subset="none" type="overrides">This method is
   required to be overridden in derived classes to close the response stream and
   free resources allocated by the current instance.</block>
          </para>
          <para>
            <block subset="none" type="usage">Use this method or
<see cref="M:System.IO.Stream.Close" qualify="true" /> to
   clean up the resources used by a <see cref="T:System.Net.WebResponse" /> .</block>
          </para>
        </remarks>
        <exception cref="T:System.NotSupportedException">This method is not implemented in the derived class.</exception>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="ContentLength">
      <MemberSignature Language="ILASM" Value=".property int64 ContentLength { public hidebysig virtual specialname int64 get_ContentLength() public hidebysig virtual specialname void set_ContentLength(int64 value) }" />
      <MemberSignature Language="C#" Value="public virtual long ContentLength { set; get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Int64</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para>Gets or sets the content length of the data received from the server.</para>
        </summary>
        <value>
          <para>A <see cref="T:System.Int64" />
containing the number of bytes returned from the resource.</para>
        </value>
        <remarks>
          <para>
            <block subset="none" type="behaviors">This
      property contains the number of bytes of data in the response to the
      request associated with the current instance. For request methods that contain
      header information, the <see cref="P:System.Net.WebResponse.ContentLength" /> does not include
      the length of the header information. The value of this property is
      set by the Content-Length header received in the
      response.</block>
          </para>
          <para>
            <block subset="none" type="default">The <see cref="T:System.Net.WebResponse" /> class 
   is abstract and does not provide an implementation for this property. This property throws <see cref="T:System.NotSupportedException" />.</block>
          </para>
          <para>
            <block subset="none" type="overrides">This
   property is required to be overridden by classes that inherit from
<see cref="T:System.Net.WebResponse" /> to set the content length as appropriate for the 
   derived class. </block>
          </para>
          <para>
            <block subset="none" type="usage">Use this property to determine the number of bytes in the response.</block>
          </para>
        </remarks>
        <exception cref="T:System.NotSupportedException">This property is not implemented in the derived class. </exception>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="ContentType">
      <MemberSignature Language="ILASM" Value=".property string ContentType { public hidebysig virtual specialname string get_ContentType() public hidebysig virtual specialname void set_ContentType(string value) }" />
      <MemberSignature Language="C#" Value="public virtual string ContentType { set; get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para> Gets or sets the media type of the data received.</para>
        </summary>
        <value>
          <para>A <see cref="T:System.String" /> that
   contains the media type of the response data.</para>
        </value>
        <remarks>
          <para>
            <block subset="none" type="note">The media type is typically the MIME encoding of
      the content.</block>
          </para>
          <para>
            <block subset="none" type="behaviors">As described above.</block>
          </para>
          <para>
            <block subset="none" type="default">The <see cref="T:System.Net.WebResponse" /> class is abstract and 
   does not provide an implementation for this property. This property throws
<see cref="T:System.NotSupportedException" />.</block>
          </para>
          <para>
            <block subset="none" type="overrides">This property is required to be overridden by classes that inherit from
<see cref="T:System.Net.WebResponse" />.</block>
          </para>
          <para>
            <block subset="none" type="usage">Use this
   property to get the media type of the response.</block>
          </para>
        </remarks>
        <exception cref="T:System.NotSupportedException">This property is not implemented in the derived class. </exception>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="GetObjectData">
      <MemberSignature Language="C#" Value="protected virtual void GetObjectData (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="serializationInfo" Type="System.Runtime.Serialization.SerializationInfo" />
        <Parameter Name="streamingContext" Type="System.Runtime.Serialization.StreamingContext" />
      </Parameters>
      <Docs>
        <param name="serializationInfo">To be added.</param>
        <param name="streamingContext">To be added.</param>
        <summary>To be added.</summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="GetResponseStream">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.IO.Stream GetResponseStream()" />
      <MemberSignature Language="C#" Value="public virtual System.IO.Stream GetResponseStream ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.IO.Stream</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para>Returns a <see cref="T:System.IO.Stream" /> that contains data from the current host.</para>
        </summary>
        <returns>
          <para> A <see cref="T:System.IO.Stream" /> for reading data from the
   current
   host.</para>
        </returns>
        <remarks>
          <para>
            <block subset="none" type="behaviors">This method is
      required to return a <see cref="T:System.IO.Stream" /> from the host specified by the <see cref="P:System.Net.WebResponse.ResponseUri" /> property of the current instance.</block>
          </para>
          <para>
            <block subset="none" type="default">This method throws <see cref="T:System.NotSupportedException" />.</block>
          </para>
          <para>
            <block subset="none" type="overrides">This
   method is required to be overridden by classes that inherit from
<see cref="T:System.Net.WebResponse" />.</block>
          </para>
          <para>
            <block subset="none" type="usage">Use this method to open a connection to the current host. To close the stream when it
   is no longer needed, in order to prevent the exhaustion of system resources, invoke
   either the <see cref="M:System.IO.Stream.Close" qualify="true" /> or <see cref="M:System.Net.WebResponse.Close" />
   methods.</block>
          </para>
        </remarks>
        <exception cref="T:System.NotSupportedException">This method is not implemented in the derived class. </exception>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="Headers">
      <MemberSignature Language="ILASM" Value=".property class System.Net.WebHeaderCollection Headers { public hidebysig virtual specialname class System.Net.WebHeaderCollection get_Headers() }" />
      <MemberSignature Language="C#" Value="public virtual System.Net.WebHeaderCollection Headers { get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Net.WebHeaderCollection</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para> Gets the collection of header name/value pairs associated with the current
      instance.</para>
        </summary>
        <value>
          <para>A <see cref="T:System.Net.WebHeaderCollection" /> containing the header name/value pairs associated
   with the current instance.</para>
        </value>
        <remarks>
          <para>This property contains a <see cref="T:System.Net.WebHeaderCollection" /> instance containing the
   header information returned in the response from the resource. </para>
          <para>
            <block subset="none" type="behaviors">This property is read-only.</block>
          </para>
          <para>
            <block subset="none" type="default">The <see cref="T:System.Net.WebResponse" /> class is
abstract and does not provide an implementation for this property. This property
throws <see cref="T:System.NotSupportedException" />.</block>
          </para>
          <para>
            <block subset="none" type="overrides">This property
   is required to be overridden by classes that inherit from <see cref="T:System.Net.WebResponse" />.</block>
          </para>
          <para>
            <block subset="none" type="usage">Use this property
   to retrieve the header information received with the response.</block>
          </para>
        </remarks>
        <exception cref="T:System.NotSupportedException">This property is not implemented in the derived class. </exception>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="IsFromCache">
      <MemberSignature Language="C#" Value="public virtual bool IsFromCache { get; }" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>To be added.</summary>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="IsMutuallyAuthenticated">
      <MemberSignature Language="C#" Value="public virtual bool IsMutuallyAuthenticated { get; }" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>To be added.</summary>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="ResponseUri">
      <MemberSignature Language="ILASM" Value=".property class System.Uri ResponseUri { public hidebysig virtual specialname class System.Uri get_ResponseUri() }" />
      <MemberSignature Language="C#" Value="public virtual Uri ResponseUri { get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Uri</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para>Gets the URI 
      of the resource associated with the current instance.</para>
        </summary>
        <value>
          <para>A <see cref="T:System.Uri" /> containing the URI 
   of the resource associated with the current response.</para>
        </value>
        <remarks>
          <block subset="none" type="behaviors">
            <para>This property is read-only.</para>
            <para>This property returns the URI that provided the response 
         information in the current instance. <block subset="none" type="note">If the
         method protocol used in the associated <see cref="T:System.Net.WebRequest" /> permits redirection, the value of this property
         might differ from the <see cref="P:System.Net.WebRequest.RequestUri" /> property of the request.</block></para>
          </block>
          <para>
            <block subset="none" type="default">The <see cref="T:System.Net.WebResponse" /> class is 
   abstract and does not provide an implementation for this property. This property
   throws <see cref="T:System.NotSupportedException" />
   .</block>
          </para>
          <para>
            <block subset="none" type="overrides">This property
   is required to be overridden by classes that inherit from <see cref="T:System.Net.WebResponse" />.</block>
          </para>
          <para>
            <block subset="none" type="usage">Use this property
   to determine the URI that originated the response.</block>
          </para>
        </remarks>
        <exception cref="T:System.NotSupportedException">This property is not implemented in the derived class. </exception>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="System.IDisposable.Dispose">
      <MemberSignature Language="ILASM" Value=".method private final hidebysig virtual void System.IDisposable.Dispose()" />
      <MemberSignature Language="C#" Value="void IDisposable.Dispose ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>Implemented to support the <see cref="T:System.IDisposable" /> interface. [Note: For more information, see <see cref="M:System.IDisposable.Dispose" />.]</summary>
        <remarks>To be added.</remarks>
      </Docs>
      <Excluded>0</Excluded>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
    </Member>
    <Member MemberName="System.Runtime.Serialization.ISerializable.GetObjectData">
      <MemberSignature Language="C#" Value="void ISerializable.GetObjectData (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="serializationInfo" Type="System.Runtime.Serialization.SerializationInfo" />
        <Parameter Name="streamingContext" Type="System.Runtime.Serialization.StreamingContext" />
      </Parameters>
      <Docs>
        <param name="serializationInfo">To be added.</param>
        <param name="streamingContext">To be added.</param>
        <summary>To be added.</summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
  </Members>
  <TypeExcluded>0</TypeExcluded>
</Type>
