HttpResponseWrapper.WriteFile Method    
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Writes the specified file to the HTTP response output stream.
Overloads
| WriteFile(IntPtr, Int64, Int64) | Writes the specified file to the HTTP response output stream. | 
| WriteFile(String, Int64, Int64) | Writes the specified file to the HTTP response output stream. | 
| WriteFile(String) | Writes the contents of the specified file to the HTTP response output stream as a file block. | 
| WriteFile(String, Boolean) | Writes the contents of the specified file to the HTTP response output stream and specifies whether the content is written as a memory block. | 
WriteFile(IntPtr, Int64, Int64)
Writes the specified file to the HTTP response output stream.
public:
 override void WriteFile(IntPtr fileHandle, long offset, long size);public override void WriteFile(IntPtr fileHandle, long offset, long size);override this.WriteFile : nativeint * int64 * int64 -> unitPublic Overrides Sub WriteFile (fileHandle As IntPtr, offset As Long, size As Long)Parameters
- fileHandle
- 
				
				IntPtr
nativeint 
The file handle of the file to write to the HTTP output stream.
- offset
- Int64
The position in the file where writing starts.
- size
- Int64
The number of bytes to write, starting at offset.
Exceptions
fileHandle is null.
Applies to
WriteFile(String, Int64, Int64)
Writes the specified file to the HTTP response output stream.
public:
 override void WriteFile(System::String ^ filename, long offset, long size);public override void WriteFile(string filename, long offset, long size);override this.WriteFile : string * int64 * int64 -> unitPublic Overrides Sub WriteFile (filename As String, offset As Long, size As Long)Parameters
- filename
- String
The name of the file to write to the HTTP output stream.
- offset
- Int64
The position in the file where writing starts.
- size
- Int64
The number of bytes to write, starting at offset.
Exceptions
Applies to
WriteFile(String)
Writes the contents of the specified file to the HTTP response output stream as a file block.
public:
 override void WriteFile(System::String ^ filename);public override void WriteFile(string filename);override this.WriteFile : string -> unitPublic Overrides Sub WriteFile (filename As String)Parameters
- filename
- String
The name of the file to write to the HTTP output stream.
Exceptions
The filename parameter is null.
Applies to
WriteFile(String, Boolean)
Writes the contents of the specified file to the HTTP response output stream and specifies whether the content is written as a memory block.
public:
 override void WriteFile(System::String ^ filename, bool readIntoMemory);public override void WriteFile(string filename, bool readIntoMemory);override this.WriteFile : string * bool -> unitPublic Overrides Sub WriteFile (filename As String, readIntoMemory As Boolean)Parameters
- filename
- String
The name of the file to write to the current response.
- readIntoMemory
- Boolean
true to write the file into a memory block.
Exceptions
The filename parameter is null.