Need some help with setting up authentication for .net web app. This is my first time setting up authentication in .net so I might be missing something.
What I have is an app that needs two levels of permission - on the root folder domain users will have permission and in the admin folder only the admins will have permission.
I am working with IIS 6, VS 05 and SQL 05. The site in IIS has integrated authentication enabled - anonymous and other auth methods are disabled. The domain user group and admin group have permissions in SQL to the appropriate database. My web.config contains:
authentication mode="windows"
Identity impersonate = "true"
connectionString="Data Source=servername\serverInstance; Database=DBName;Trusted_Connection=Yes;Application Name=AppName"
I tested the site with one of our test users on our development environment. The test user can access a page under the root of the site and execute a stored procedure with no problems but when I try to go to a page located in the admin directory I receive an error stating that the user does not have permission to execute a stored procedure. Even though this user is in both groups, domainUser and admin, and they both have permissions to the DB. I also gave the users explicit execute permission to the stored procedures. I checked that SQl was using windows authentication mode and it is.
From event viewer it looks like .net is not impersonating the user in the admin folder. The error logged is:
The execute permission was denied on the object 'spStoredProcedureName'
Account Name: Network Service
The last time I got this error was because I didn't have identity impersonate = true in the web.config but it's there now and there is only one web.config for the whole site. I removed domain users on the file permissions and tried just using the admin file permissions for the whole site and get the same result. I also checked various other settings in IE to no avail.