簡體   English   中英

用戶無權執行此操作。 ? 有什么問題?

[英]User does not have permission to perform this action. ? what was the problem?

當我在aspspider.com上傳我的網站時,它顯示以下消息..那是什么問題......我完全糊塗了..

我使用asp.net的默認數據庫即ASPNETDB.MDF

Server Error in '/dobriyal' 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 7:          Dim cmdSelect As New System.Data.SqlClient.SqlCommand("SELECT Password FROM a1_admins WHERE EmployeeId =" & TextBox1.Text & " And Email = '" & TextBox2.Text & "'", SQLData)
Line 8:  
Line 9:          SQLData.Open()
Line 10:         Dim dtrReader As System.Data.SqlClient.SqlDataReader = cmdSelect.ExecuteReader()
Line 11:         If dtrReader.HasRows Then

Source File: C:\MemberSites\MemberSites_AspSpider_Org\dobriyal\webroot\admin\forgot_password.aspx.vb    Line: 9 

Stack Trace: 


[SqlException (0x80131904): User does not have permission to perform this action.]
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +1019
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
   System.Data.SqlClient.SqlConnection.Open() +125
   admin_forgot_password.Button1_Click(Object sender, EventArgs e) in C:\MemberSites\MemberSites_AspSpider_Org\dobriyal\webroot\admin\forgot_password.aspx.vb:9
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

看起來您使用連接到數據庫的任何用戶都沒有對該表的選擇權限。

使用grant來解決這個問題。

是您的數據庫不允許用戶權限。 在您的連接字符串中,它是什么用戶? 使用' Grant '授予該SQL用戶必要的訪問權限。 可能需要能夠從必要的表中進行選擇。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM