Installation Issue

May 18, 2009 at 2:20 PM

HI

 

I'm trying to install but I keep on getting the following error when I want to create tables. I have given the Network Service evry right on Directories and in SQL manager. I have tried the following commands as well.

sp_grantlogin 'NT AUTHORITY\NETWORK SERVICE'

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -ga "NT AUTHORITY\NETWORK SERVICE"

Please 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:\web\setup\build_database.aspx.cs:line 44

Coordinator
May 19, 2009 at 10:01 AM

This is just a SQL permissions error.  Yo have to understand how SQL permissions work: there is a user *and* a login.

From the Wiki:

  • Now that your user/login is made, you need to give it permissions
    • Under Databases > Security > Logins you will see your newly created login, right click on it and choose Properties
      • Change Default database to 'SlickTicket' click OK
    • Under Databases > SlickTicket > Security > Users you will see your newly created user, right click on it and choose Properties
      • Under General check db_onwer, db_reader and db_writer in Database role membership click OK