sql 服务器快速权限

sql server express Permissions

我在 sql server express 中用数据库创建了一个 Web 应用程序 我打开服务器并在 visual studio 中构建表(我找不到其他方法) 当我访问数据库网站(在线)时说我没有权限, 有谁知道我如何通过visual studio添加权限?

错误:

Server Error in '/' Application.

The SELECT permission was denied on the object 'UsersTable', database 'master', schema 'dbo'.

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: The SELECT permission was denied on the object 'UsersTable', database 'master', schema 'dbo'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): The SELECT permission was denied on the object 'UsersTable', database 'master', schema 'dbo'.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) +3279580<br> System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +791<br> System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4927<br> System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +92<br> System.Data.SqlClient.SqlDataReader.get_MetaData() +102<br> System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +552<br> System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +3114<br> System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +554
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +98
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +307
System.Data.SqlClient.SqlCommand.ExecuteReader() +132
KIP_FP.KIPDB.chackUser(String userN) in C:\Users\Administrator\Documents\KIP-FP\KIP-FP\KIPDB.cs:31
KIP_FP.KIPBL.chackUser(String userN) in C:\Users\Administrator\Documents\KIP-FP\KIP-FP\KIPBL.cs:37
KIP_FP.loginUserPage.Button1_Click(Object sender, EventArgs e) in C:\Users\Administrator\Documents\KIP-FP\KIP-FP\Login.aspx.cs:34
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +11750641
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +150 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6016

您有权在 UsersTable table 上创建 SELECT 但您的 Web 应用程序的应用程序池没有它,因为它 运行ning 在另一个具有以下权限的用户帐户下没有许可。 要添加权限,您必须 运行 像这样:

USE master;  
GRANT SELECT ON OBJECT::dbo.UsersTable TO PoolUser;  
GO  

但首先你应该找出哪个用户在应用程序上。池.