We have a customer who uses Form based authentication in his ASP.NET application. But he also wants to use FileStream feature. Authentication becomes a challenge. In order for FileStream to work, sql connection needs to use ingetrated security (not SQL Server based login). Here is the post.When you use Anonymous Access and Form based authentication, windows users cannot be impersonated. Therefore, you can't take the windows user from web client to authenticate to SQL Server. Most of the time, a developer just use SQL login to access SQL Server database. But this is not an option for File Stream access. Fortunately, there is an easy solution to this. The solution is that you use IIS process level identity to logon to SQL Server using Integrated Security.Even with IIS's Anonymous Access, IIS still has a process level identity at Windows level. You can take advantage of this fact to allow this process account access to SQL Server using Windows authentication.
Here is a summary:
Step by Step Instruction (using Windows 2003 Server / IIS 5.0)
Assumptions:
Note: you can also customize IIS process account without having to use "Network Service" (or machine account). Please consult IIS documentation on how to achieve this.
Jack Li | Senior Escalation Engineer | Microsoft SQL Server Support
PingBack from http://edebtsettlementprogram.info/story.php?id=21966
Great tutorial, but I'm stuck on "Grant the IIS machine account to access SQL Server."
I tried the query and got this: Windows NT user or group 'MyDomain\MyMachineName$ ' not found. Check the name again.
It's looking for a user or group. I thought we were setting permissions for the machine?
My mistake.. kinda..
It doesn't work when there's an extra space in the string, 'domain1\machineA$ ' ;)