Help setting up permissions

Feb 24, 2009 at 8:57 PM

I'm completely new to databases, so please bear with me.

I'm having two problems setting up Slickticket. I'm logged onto a W2003 Server test machine as a domain administrator. This is the account I've created the database SlickTicket with, as well as configured the IIS website.

1. The setup screen indicates that setup must be run by an account with rights to read the setup/setup_Data folder. I'm running the setup as an administrator. I've checked NTFS security on the website folder and both administrator and the IIS Guest account have read access to the entire folder. However when I click Setup a webpage error comes up regarding denied access to the setup_data\styles.xml file. Only when I grant Everyone full control of the folder does the setup process continue.

2. When I grant Everyone access to the slickticket website folder the setup kind of continues, but really only spits out a different permissions error, this time by the code of the site itself. It's a long one, but the heart of the matter is in the first line or two as follows below. Since I'm doing all of this as the administrator, and the SQL database is using Windows Authentication, I was hoping I wouldn't have to change the connection string in web.config as I'd rather not have a user/password combo in plan text. Again, the is the very first SQL database I've setup/work on, and although I've searched The Google extensively I have yet to find a post to move me on my way. These seem like pretty basic things so I feel like an idiot to be asking, but I've exhausted my limited resources. Help!

An error occured: System.Data.SqlClient.SqlException: Cannot open database "SlickTicket" requested by the login. The login failed. Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at setup_build_database.btnRunSQL_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\slickticket\setup\build_database.aspx.cs:line 44
Feb 27, 2009 at 2:57 PM
Edited Feb 27, 2009 at 3:00 PM
This is a SQL permissions error for sure.

You don't have to change the ConnectionString in the web.config if you go in to SQL and give your 'NT AUTHORITY\NETWORK SERVICE' rights to the DB (as that is the one that is trying to access it).  I would use SQL Server Managemement studio to accomplish this in the security section.

As for permissions to the setup folder, that is not a big deal, as you can just delete the whole folder after installation is complete.
Feb 27, 2009 at 4:01 PM
Edited Feb 27, 2009 at 4:04 PM

Brilliant! That's it. I was reluctant to open permissions of the setup folder but now that it's deleted it doesn't matter. Thanks for the help and the product. I think I'll be able to make good use of it.