title: Access Denied accessing FILESTREAM on a SQL 2008 r2 from an ASP.NET Application
body: <p>This is an asp.net app using "Forms" as the authentication mode, a single SQL user is specified in the connection string ("Server=SQLSERVER;Database=DB;User Id=user;Password=pwd;Persist Security Info=True;") and obviously access to the FILESTREAM is denied, both services IIS and SQL resides on different machines. Everything works on my development environment but the connection string here relays on the current windows user with trusted connection.</p>
  
  <p>I created a SERVICE ACCOUNT and configured the application pool in IIS to run with its credentials, we added the same user to the SQL server and assigned rights to the database we need, initially I was getting "Cannot create SSPI context" as the error, then I set a connection to the server to be used from the FILESTREAM Management module which use "Trusted Connection = True" (Server=SQLSERVER;Database=DB;Persist Security Info=True;Trusted_Connection=True;), now I'm getting a denied access as well but now "Login failed for user 'DOMAIN\SERVERNAME'.", where servername is the server hosting the IIS.</p>
  
  <p>Any help will be greatly appreciated!!!</p>