问题描述
详细信息如下:ServerErrorin'/'Application.--------------------------------------------------------------------------------拒绝了对对象'CS_NOIP'(数据库'Life',所有者'dbo')的SELECT权限。Description:Anunhandledexceptionoccurredduringtheexecutionofthecurrentwebrequest.Pleasereviewthestacktraceformoreinformationabouttheerrorandwhereitoriginatedinthecode.ExceptionDetails:System.Data.SqlClient.SqlException:拒绝了对对象'CS_NOIP'(数据库'Life',所有者'dbo')的SELECT权限。SourceError:Anunhandledexceptionwasgeneratedduringtheexecutionofthecurrentwebrequest.Informationregardingtheoriginandlocationoftheexceptioncanbeidentifiedusingtheexceptionstacktracebelow.StackTrace:[SqlException(0x80131904):拒绝了对对象'CS_NOIP'(数据库'Life',所有者'dbo')的SELECT权限。]System.Data.SqlClient.SqlConnection.OnError(SqlExceptionexception,BooleanbreakConnection)+925466System.Data.SqlClient.SqlInternalConnection.OnError(SqlExceptionexception,BooleanbreakConnection)+800118System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObjectstateObj)+186System.Data.SqlClient.TdsParser.Run(RunBehaviorrunBehavior,SqlCommandcmdHandler,SqlDataReaderdataStream,BulkCopySimpleResultSetbulkCopyHandler,TdsParserStateObjectstateObj)+1932System.Data.SqlClient.SqlDataReader.ConsumeMetaData()+31System.Data.SqlClient.SqlDataReader.get_MetaData()+62System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReaderds,RunBehaviorrunBehavior,StringresetOptionsString)+297System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehaviorcmdBehavior,RunBehaviorrunBehavior,BooleanreturnStream,Booleanasync)+1005System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehaviorcmdBehavior,RunBehaviorrunBehavior,BooleanreturnStream,Stringmethod,DbAsyncResultresult)+132System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehaviorcmdBehavior,RunBehaviorrunBehavior,BooleanreturnStream,Stringmethod)+32System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehaviorbehavior,Stringmethod)+122System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehaviorbehavior)+12System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehaviorbehavior)+7System.Data.Common.DbDataAdapter.FillInternal(DataSetdataset,DataTable[]datatables,Int32startRecord,Int32maxRecords,StringsrcTable,IDbCommandcommand,CommandBehaviorbehavior)+141System.Data.Common.DbDataAdapter.Fill(DataSetdataSet,Int32startRecord,Int32maxRecords,StringsrcTable,IDbCommandcommand,CommandBehaviorbehavior)+137System.Data.Common.DbDataAdapter.Fill(DataSetdataSet,StringsrcTable)+83PW35COM.DBUtility.SqlHelper.ExecuteDataSet(StringconnectionString,CommandTypecmdType,StringcmdText,StringtabName,SqlParameter[]commandParameters)+265PW35COM.Web.WebBase.getIP()+572PW35COM.Web.WebBase.BeginPage()+57PW35COM.Web.index.Page_Load(Objectsender,EventArgse)+201System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtrfp,Objecto,Objectt,EventArgse)+15System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Objectsender,EventArgse)+33System.Web.UI.Control.OnLoad(EventArgse)+99System.Web.UI.Control.LoadRecursive()+47System.Web.UI.Page.ProcessRequestMain(BooleanincludeStagesBeforeAsyncPoint,BooleanincludeStagesAfterAsyncPoint)+1436--------------------------------------------------------------------------------VersionInformation:Microsoft.NETFrameworkVersion:2.0.50727.1433;ASP.NETVersion:2.0.50727.1433
解决方案
解决方案二:
打开数据库右击-》属性-》找到权限设置都打上钩就行了