locked
Club Site connection string RRS feed

  • Question

  • User1753414475 posted

     So far have moved database to sql2008 express,

    setup connection to database and connects ok.

    Site builds ok in VS2010

    Now getting "System.Data.SqlClient.SqlException was unhandled by user code
     
      ErrorCode=-2146232060
      LineNumber=65536
      Message=User does not have permission to perform this action.
      Number=15247
      Procedure=""
      Server=192.168.2.199
      Source=.Net SqlClient Data Provider
      State=1
      StackTrace:
           at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
           at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
           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, TimeoutTimer timeout, SqlConnection owningObject)
           at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)
           at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, 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 ASP.WebContent.Page_Load(Object sender, EventArgs e) in C:\Users\daaaon\Desktop\WSC club kit\UserControls\WebContent.ascx:line 61
           at System.Web.UI.Control.OnLoad(EventArgs e)
           at System.Web.UI.Control.LoadRecursive()
           at System.Web.UI.Control.LoadRecursive()
           at System.Web.UI.Control.LoadRecursive()
           at System.Web.UI.Control.LoadRecursive()
           at System.Web.UI.Control.LoadRecursive()
           at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
      InnerException:
    ."

    What permissions are needed by user for database to function properly?

    Tuesday, July 20, 2010 9:05 PM

Answers

  • User-1802908944 posted

    I think,  read/update/insert permission on the speicific columns of the table on the users.

    or reinstalled the whole thing and it will work.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 21, 2010 12:12 AM

All replies

  • User-1802908944 posted

    I think,  read/update/insert permission on the speicific columns of the table on the users.

    or reinstalled the whole thing and it will work.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 21, 2010 12:12 AM
  • User-1576985591 posted

    You're connecting ok because the login id you're using has connection priviledges to the DB engine instance, but that doesn't mean that it has permissions to access a database or the objects within any given database.

    Open up WebContent.ascx:line 61, and figure out what database operation the logic is trying to perform at that point (take a look at the SQL statement/stored proc, or if it's a object database source - dig back to the point where it's performing SQL). Note the operation or tables, and then GRANT the appropriate permissions on the database side to the login identified in the connection string. (SELECT, INSERT, UPDATE, etc...)

     

    Regards,

    Scott

    Wednesday, August 25, 2010 3:14 AM