tags:

views:

431

answers:

2

I have trouble accessing filestream via SqlFileStream. Sql server and IIS7 are on different servers, remote access to Filestream is enabled. Workgroup for both servers is the same.

I've tried everything, including opening user with identical username/passwords on both servers. Didn't work.

Dim sqlFileStream As New SqlTypes.SqlFileStream(filePath, txContext, IO.FileAccess.Read)

I have both filePath and context.

However, when I open server via explorer logged on locally as Administrator, I also get access denied if I try to acesss this share. Any ideas?

Can permissions for this share be edited at all?

A: 

The solution to this problem is to have user with same credentials on both sql server machine and IIS machine. Also, application pool identity must be running with these credentials, and connection string must be set to integrated security.

To edit permissions for this share you edit permissions on this table, as the documentation clearly states (funny how this clearly comes to you only after tenth time reading it):

In SQL Server, FILESTREAM data is secured just like other data is secured: by granting permissions at the table or column levels. If a user has permission to the FILESTREAM column in a table, the user can open the associated files.

Vnuk
A: 

"Integrated Security = True;" in connection string

rashik