Note that there are some explanatory texts on larger screens.

plurals
  1. POSQLFileStream exception "The network path was not found"
    primarykey
    data
    text
    <p>I am trying to insert a file into a database which uses SQL File Streaming. When I try to initialize the SqlFileStream object that I will be inserting with I receive a File Exception stating that the network path could not be found.</p> <p>The code in question is below:</p> <pre><code>using (SqlFileStream sqlStream = new SqlFileStream(filePathName.Value, fileToken.Value, FileAccess.Write)) { byte[] buffer = new byte[512 * 1024]; // 512Kb int bytesRead = fs.Read(buffer, 0, buffer.Length); while (bytesRead &gt; 0) { sqlStream.Write(buffer, 0, bytesRead); bytesRead = fs.Read(buffer, 0, buffer.Length); } } </code></pre> <p>The code fails at the first line when SqlFileStream is created. Below are my settings on how FILESTREAM is configured. At the database level I have set the Filestream access level to: "Full access enabled".</p> <p>Enable FILESTREAM for Transact-SQL access: Checked <br /> Enable FILESTREAM for file I/O streaming access: Checked <br /> Windows share name: DVDB1FS <br /> Allow remote clients to have streaming access to FILESTREAM data: Checked</p> <p>Any suggestion on what may be causing this would be great. I have successfully used this exact same code in other environments without issue, so I know it must be a configuration issue of some sort. It may be important to note that if I try to access the windows share //servername/DVDB1FS I also receive a "Network path was not found" error from Windows Explorer. If I access the share directly on a different server in a different environment (Test, Production) I receive an "Access is denied" error.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload