Question: I download a file with this method:

```
WebClient WC = new WebClient();
WC.DownloadFile(url, filePath);

```

And i want that in the same time to read the file in the same time with:

```
var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.None);

```

but i get allways :

```
The process cannot access the file 'filePath' because it is being used by another process.

```

It's possible to download and read in the same time?

Edit
====

I now download the file with:

```
var req = (HttpWebRequest)HttpWebRequest.Create(url);
                var fileStream = new FileStream(filePath,
                    FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite);

                using (var resp = req.GetResponse())
                {
                    using (var stream = resp.GetResponseStream())
                    {
                        byte[] buffer = new byte[0x10000];
                        int len;
                        while ((len = stream.Read(buffer, 0, buffer.Length)) > 0)
                        {
                            fileStream.Write(buffer, 0, len);
                        }
                    }
                }

```

And still get the error....

Answer: 
```
var req = (HttpWebRequest)HttpWebRequest.Create(url);
using (var resp = req.GetResponse())
{
    using (var stream = resp.GetResponseStream())
    {
        byte[] buffer = new byte[0x10000];
        int len;
        while ((len = stream.Read(buffer, 0, buffer.Length))>0)
        {
            //Do with the content whatever you want
            // ***YOUR CODE*** 
            fileStream.Write(buffer, 0, len);
        }
    }
}

```
Try this way : 

```
HttpWebRequest request = (HttpWebRequest) WebRequest.Create("http://www.domain.com/file.txt");
HttpWebResponse response = (HttpWebResponse) request.GetResponse();

var stream = response.GetResponseStream();
byte[] buffer = new byte[8192];
int bytesRead = 0;
while ((bytesRead = stream.Read(buffer, 0, 8192)) > 0)
{
    // handle your raw data
    // you needed raw data = buffer[0 to bytesRead - 1]

}
stream.Close();
response.Close();

```