Community discussion forum

User does not have permission to perform this action error

  • 1 month ago

    hi guys, i have recently uploaded my project in school website, in a free host site.

    but unfortunately, i encountered this error, check this out:

    Server Error in '/projecty3' Application.

    User does not have permission to perform this action.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: User does not have permission to perform this action.

    Source Error:

    Line 17780:            If ((command.Connection.State And Global.System.Data.ConnectionState.Open)  _
    Line 17781: <> Global.System.Data.ConnectionState.Open) Then
    Line 17782: command.Connection.Open
    Line 17783: End If
    Line 17784: Dim returnValue As Object

    Source File: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\projecty3\d15ccf5e\7c8362cd\App_Code.n5wxep1j.21.vb    Line: 17782

    Stack Trace:

    [SqlException (0x80131904): User does not have permission to perform this action.]
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800131
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
    System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
    System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +172
    System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +381
    System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181
    System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173
    System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +133
    System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
    System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
    System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
    System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +494
    System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
    System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
    System.Data.SqlClient.SqlConnection.Open() +111
    YaletrakDataSetTableAdapters.OrdersTableAdapter.GetOrderNoWithNoRows() in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\projecty3\d15ccf5e\7c8362cd\App_Code.n5wxep1j.21.vb:17782
    OrdersBLL.GetOrderNoWithNoRows() in C:\MemberSites\MemberSites_AspSpider_Info\projecty3\webroot\App_Code\BLL\OrdersBLL.vb:43
    secure_customer_CustomerOrders.Page_Load(Object sender, EventArgs e) in C:\MemberSites\MemberSites_AspSpider_Info\projecty3\webroot\secure_customer\CustomerOrders.aspx.vb:12
    System.Web.UI.Control.OnLoad(EventArgs e) +99
    System.Web.UI.Control.LoadRecursive() +47
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436


    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 

     i dont have any idea about this, because this is my first time to upload in a web host site. and i should make things work, before september 30. i hope we will make this work guys.

  • Advertisement

    Simply the fastest line-level profiler for .NET ever

    “The low overhead means it has minimal impact on the execution of my program”
    Mark Everest, Development Team Leader, Renault F1 Team Ltd.

    Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now

  • 1 month ago

    Hi,

    I haven't used SQL Server yet, but from what I understand, if the SQL Server is residing on a machine that isn't the same as the IIS Host machine, then the account ASPNET will need to be given access to the SQL Server.

    You can do some research on the net about distributed hosting of IIS and SQL Server and access issues.

    Regards

    Simon C

  • 1 month ago

    Hi mekaushik iam also facing same problem, Have u made setup and then deployed

  • 1 month ago

    have u used backend as sqlserver2005

  • 1 month ago

    Have u given connection in web.config

  • 1 month ago

    If not then try this In web.config file *Specify it After *

    Declare It In Class After Inherits System.Web.UI.Page******

    Dim DbConnect As New SqlConnection(ConfigurationSettings.AppSettings("Connect"))

    *Imports This NameSpace**** Imports System.Configuration

  • 1 month ago

    This definitely sounds like a permission issue on the SQL server. I would check that the user you are connecting to the database with actually has permissions to connect and read/write data - believe it or not you can create a user that doesn't have permissions to connect!

Post a reply

Enter your message below

Sign in or Join us (it's free).